mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-02-23 06:32:27 +08:00
feat: 左侧菜单,过滤children下面的item为hidden状态
This commit is contained in:
@@ -104,7 +104,10 @@ export function getChildrenRouter(routerMap: Array<any>) {
|
|||||||
* 判断根路由 Router
|
* 判断根路由 Router
|
||||||
* */
|
* */
|
||||||
export function isRootRouter(item) {
|
export function isRootRouter(item) {
|
||||||
return item.meta?.alwaysShow != true && item.children?.length === 1;
|
return (
|
||||||
|
item.meta?.alwaysShow != true &&
|
||||||
|
item?.children?.filter((item) => !Boolean(item?.meta?.hidden))?.length === 1
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user