feat(权限管理): 屏蔽包含 'summary' 的路由
- 恢复之前注释掉的代码,过滤掉路径中包含 'summary' 的路由 -优化代码格式,提高可读性
Showing
1 changed file
with
4 additions
and
4 deletions
| ... | @@ -64,10 +64,10 @@ const permission = { | ... | @@ -64,10 +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 的路由 | 67 | + // 屏蔽包含 summary 的路由 |
| 68 | - // if (route.path.includes('summary')) { | 68 | + if (route.path.includes('summary')) { |
| 69 | - // return false; | 69 | + return false; |
| 70 | - // } | 70 | + } |
| 71 | if (type && route.children) { | 71 | if (type && route.children) { |
| 72 | route.children = filterChildren(route.children) | 72 | route.children = filterChildren(route.children) |
| 73 | } | 73 | } | ... | ... |
-
Please register or login to post a comment