update 优化代码

This commit is contained in:
疯狂的狮子Li
2025-04-22 13:32:15 +08:00
parent 660d5b3d4f
commit e5de3f4e9d
4 changed files with 4 additions and 5 deletions

View File

@ -51,7 +51,7 @@ const topMenus = computed(() => {
routers.value.map((menu) => {
if (menu.hidden !== true) {
// 兼容顶部栏一级菜单内部跳转
if (menu.path === '/') {
if (menu.path === '/' && menu.children) {
topMenus.push(menu.children ? menu.children[0] : menu);
} else {
topMenus.push(menu);