refactor(store): 解除路由过滤器对 '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 的路由,master分支不屏蔽 |
| 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