提交 73dc5c7e authored 作者: wangjiahao's avatar wangjiahao

fix: 修改没有权限菜单全部打开的情况

上级 d2652dfd
......@@ -124,9 +124,9 @@ const hasCurrentRouter = (locations, routers, index) => {
// 根据权限过滤菜单
const filterRouter = routers => {
const user_permissions = store.getters.permissions
if (!user_permissions || user_permissions.length === 0) {
return routers
}
// if (!user_permissions || user_permissions.length === 0) {
// return routers
// }
const tempResults = routers.filter(router => hasPermission(router, user_permissions))
// 如果是一级菜单(目录) 没有字菜单 那就移除
return tempResults.filter(item => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论