mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复一级菜单隐藏失效问题
This commit is contained in:
@ -67,6 +67,8 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
if (authRouteMode.value === 'dynamic') {
|
if (authRouteMode.value === 'dynamic') {
|
||||||
if (route.path === '/' && route.children?.length) {
|
if (route.path === '/' && route.children?.length) {
|
||||||
const child = route.children[0];
|
const child = route.children[0];
|
||||||
|
// @ts-expect-error no hidden field
|
||||||
|
child.hidden = route.hidden;
|
||||||
parseRouter(child);
|
parseRouter(child);
|
||||||
child.name = Math.random().toString(36).slice(2, 12);
|
child.name = Math.random().toString(36).slice(2, 12);
|
||||||
Object.assign(route, child);
|
Object.assign(route, child);
|
||||||
@ -123,7 +125,6 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => {
|
|||||||
} else if (!isNotNull(route.meta.icon)) {
|
} else if (!isNotNull(route.meta.icon)) {
|
||||||
route.meta.icon = defaultIcon;
|
route.meta.icon = defaultIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-expect-error no hidden field
|
// @ts-expect-error no hidden field
|
||||||
route.meta.hideInMenu = route.hidden;
|
route.meta.hideInMenu = route.hidden;
|
||||||
if (route.meta.hideInMenu && parent) {
|
if (route.meta.hideInMenu && parent) {
|
||||||
|
Reference in New Issue
Block a user