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

Merge pull request !636 from chenting/N/A
This commit is contained in:
芋道源码 2025-01-04 01:15:21 +00:00 committed by Gitee
commit 5fce1afe29
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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 包含 ?,则表示需要传递参数