优化代码

This commit is contained in:
RuoYi
2025-04-22 12:03:31 +08:00
parent a9f9133e31
commit 8f4eb24bf2
4 changed files with 4 additions and 2 deletions

View File

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