优化代码

This commit is contained in:
RuoYi
2025-04-22 11:48:56 +08:00
parent f2a0f69465
commit 06d52deb60
8 changed files with 26 additions and 42 deletions

View File

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