feat(router): add route hidden

This commit is contained in:
pengYYY 2022-02-22 12:20:33 +08:00
parent 9472ca622f
commit 2efb726c3e

View File

@ -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) => {