mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 08:36:29 +08:00
feat(router): add route hidden
This commit is contained in:
parent
9472ca622f
commit
2efb726c3e
|
@ -6,7 +6,8 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
|
||||||
if (!list) {
|
if (!list) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return list.map((item) => {
|
return list
|
||||||
|
.map((item) => {
|
||||||
const path = basePath ? `${basePath}/${item.path}` : item.path;
|
const path = basePath ? `${basePath}/${item.path}` : item.path;
|
||||||
return {
|
return {
|
||||||
path,
|
path,
|
||||||
|
@ -16,7 +17,8 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
|
||||||
meta: item.meta,
|
meta: item.meta,
|
||||||
redirect: item.redirect,
|
redirect: item.redirect,
|
||||||
};
|
};
|
||||||
});
|
})
|
||||||
|
.filter((item) => item.meta && item.meta.hidden !== true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const renderIcon = (item) => {
|
const renderIcon = (item) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user