jiaxing.zhou

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

- 在 filterAsyncRouter 函数中添加了对包含 summary 的路由的过滤
- 优化了代码格式,增加了空行
...@@ -64,6 +64,10 @@ const permission = { ...@@ -64,6 +64,10 @@ const permission = {
64 // 遍历后台传来的路由字符串,转换为组件对象 64 // 遍历后台传来的路由字符串,转换为组件对象
65 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { 65 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
66 return asyncRouterMap.filter(route => { 66 return asyncRouterMap.filter(route => {
67 + // 屏蔽包含 summary 的路由
68 + if (route.path.includes('summary')) {
69 + return false;
70 + }
67 if (type && route.children) { 71 if (type && route.children) {
68 route.children = filterChildren(route.children) 72 route.children = filterChildren(route.children)
69 } 73 }
......