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

This commit is contained in:
wangjiahao 2021-06-03 16:23:56 +08:00
parent d2652dfd87
commit 73dc5c7e99

View File

@ -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 => {