perf: Optimize system management menu rendering

This commit is contained in:
fit2cloud-chenyw
2025-12-31 11:07:01 +08:00
committed by fit2cloud-chenyw
parent 883a9e58df
commit 68798f3427
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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 -2
View File
@@ -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) => {