feat(projects): support directory menu hide all child menus. fixed #325

This commit is contained in:
Soybean
2024-02-23 21:51:20 +08:00
parent 8ee2acc1fc
commit 7256ad4ee3
11 changed files with 89 additions and 2 deletions

View File

@ -85,7 +85,7 @@ export function getGlobalMenusByAuthRoutes(routes: ElegantConstRoute[]) {
if (!route.meta?.hideInMenu) {
const menu = getGlobalMenuByBaseRoute(route);
if (route.children?.length) {
if (route.children?.some(child => !child.meta?.hideInMenu)) {
menu.children = getGlobalMenusByAuthRoutes(route.children);
}