fix(projects): 修复一级菜单隐藏失效问题

This commit is contained in:
AN
2025-07-25 10:25:50 +08:00
parent f4038a2dc0
commit 8fcc70d73d

View File

@ -67,6 +67,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
if (authRouteMode.value === 'dynamic') {
if (route.path === '/' && route.children?.length) {
const child = route.children[0];
// @ts-expect-error no hidden field
child.hidden = route.hidden;
parseRouter(child);
child.name = Math.random().toString(36).slice(2, 12);
Object.assign(route, child);
@ -123,7 +125,6 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
} else if (!isNotNull(route.meta.icon)) {
route.meta.icon = defaultIcon;
}
// @ts-expect-error no hidden field
route.meta.hideInMenu = route.hidden;
if (route.meta.hideInMenu && parent) {