mirror of
https://github.com/iczer/vue-antd-admin
synced 2025-04-05 19:41:37 +08:00
fix: the exception of authority plugin; 🐛
修复:权限认证插件异常问题;
This commit is contained in:
parent
902afbe47a
commit
a44c82f937
@ -13,7 +13,7 @@ const getRoutePermission = (permissions, route) => permissions.find(item => item
|
||||
*/
|
||||
const getRouteRole = (roles, route) => {
|
||||
const requiredRoles = route.meta.authority.role
|
||||
return roles.filter(item => requiredRoles.findIndex(required => required === item.id) !== -1)
|
||||
return requiredRoles ? roles.filter(item => requiredRoles.findIndex(required => required === item.id) !== -1) : []
|
||||
}
|
||||
/**
|
||||
* 判断是否已为方法注入权限认证
|
||||
|
Loading…
x
Reference in New Issue
Block a user