mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 10:28:24 +08:00
Merge pull request #70 from Tencent/feat/router/hidden
feat(router): add route hidden
This commit is contained in:
commit
54c8a2824f
|
@ -6,7 +6,8 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
|
|||
if (!list) {
|
||||
return [];
|
||||
}
|
||||
return list.map((item) => {
|
||||
return list
|
||||
.map((item) => {
|
||||
const path = basePath ? `${basePath}/${item.path}` : item.path;
|
||||
return {
|
||||
path,
|
||||
|
@ -16,7 +17,8 @@ const getMenuList = (list: MenuRoute[], basePath?: string): MenuRoute[] => {
|
|||
meta: item.meta,
|
||||
redirect: item.redirect,
|
||||
};
|
||||
});
|
||||
})
|
||||
.filter((item) => item.meta && item.meta.hidden !== true);
|
||||
};
|
||||
|
||||
const renderIcon = (item) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user