Sfoglia il codice sorgente

修复菜单总是显示无效的问题

Signed-off-by: chenting <1016830869@qq.com>
chenting 7 mesi fa
parent
commit
7faea8c341
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/utils/routerHelper.ts

+ 1 - 1
src/utils/routerHelper.ts

@@ -73,7 +73,7 @@ export const generateRoute = (routes: AppCustomRouteRecordRaw[]): AppRouteRecord
       noCache: !route.keepAlive,
       alwaysShow:
         route.children &&
-        route.children.length === 1 &&
+        route.children.length > 0 &&
         (route.alwaysShow !== undefined ? route.alwaysShow : true)
     } as any
     // 特殊逻辑:如果后端配置的 MenuDO.component 包含 ?,则表示需要传递参数