jiaxing.zhou

feat(权限管理): 屏蔽包含 'summary' 的路由

- 恢复之前注释掉的代码,过滤掉路径中包含 'summary' 的路由
-优化代码格式,提高可读性
......@@ -64,10 +64,10 @@ const permission = {
// 遍历后台传来的路由字符串,转换为组件对象
function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
return asyncRouterMap.filter(route => {
// // 屏蔽包含 summary 的路由
// if (route.path.includes('summary')) {
// return false;
// }
// 屏蔽包含 summary 的路由
if (route.path.includes('summary')) {
return false;
}
if (type && route.children) {
route.children = filterChildren(route.children)
}
......