diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 146e8140..14ff0f8a 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -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) {