Skip to content

Commit 68798f3

Browse files
perf: Optimize system management menu rendering
1 parent 883a9e5 commit 68798f3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

backend/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ explicit = true
7474

7575
[[tool.uv.index]]
7676
name = "default"
77-
url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple"
77+
url = "https://mirrors.hust.edu.cn/pypi/web/simple"
7878
default = true
7979

8080
[[tool.uv.index]]

frontend/src/components/layout/Menu.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ElMenu } from 'element-plus-secondary'
44
import { useRoute, useRouter } from 'vue-router'
55
import MenuItem from './MenuItem.vue'
66
import { useUserStore } from '@/stores/user'
7-
import { routes } from '@/router'
7+
// import { routes } from '@/router'
88
const userStore = useUserStore()
99
const router = useRouter()
1010
defineProps({
@@ -39,7 +39,9 @@ const formatRoute = (arr: any, parentPath = '') => {
3939
4040
const routerList = computed(() => {
4141
if (showSysmenu.value) {
42-
const [sysRouter] = formatRoute(routes.filter((route) => route.path.includes('/system')))
42+
const [sysRouter] = formatRoute(
43+
router.getRoutes().filter((route: any) => route?.name === 'system')
44+
)
4345
return sysRouter.children
4446
}
4547
const list = router.getRoutes().filter((route) => {

0 commit comments

Comments
 (0)