mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 17:57:06 +08:00
perf: Optimize system management menu rendering
This commit is contained in:
committed by
fit2cloud-chenyw
parent
883a9e58df
commit
68798f3427
@@ -74,7 +74,7 @@ explicit = true
|
||||
|
||||
[[tool.uv.index]]
|
||||
name = "default"
|
||||
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
|
||||
url = "https://mirrors.hust.edu.cn/pypi/web/simple"
|
||||
default = true
|
||||
|
||||
[[tool.uv.index]]
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ElMenu } from 'element-plus-secondary'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import MenuItem from './MenuItem.vue'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { routes } from '@/router'
|
||||
// import { routes } from '@/router'
|
||||
const userStore = useUserStore()
|
||||
const router = useRouter()
|
||||
defineProps({
|
||||
@@ -39,7 +39,9 @@ const formatRoute = (arr: any, parentPath = '') => {
|
||||
|
||||
const routerList = computed(() => {
|
||||
if (showSysmenu.value) {
|
||||
const [sysRouter] = formatRoute(routes.filter((route) => route.path.includes('/system')))
|
||||
const [sysRouter] = formatRoute(
|
||||
router.getRoutes().filter((route: any) => route?.name === 'system')
|
||||
)
|
||||
return sysRouter.children
|
||||
}
|
||||
const list = router.getRoutes().filter((route) => {
|
||||
|
||||
Reference in New Issue
Block a user