fix(permission/index.ts): 权限指令添加用户权限集合非空判断
Former-commit-id: 32552c4488c47b6113a23c2c0f864bb2de908bfe
This commit is contained in:
@@ -17,7 +17,7 @@ export const hasPerm: Directive = {
|
||||
if (value) {
|
||||
const requiredPerms = value; // DOM绑定需要的按钮权限标识
|
||||
|
||||
const hasPerm = user.perms.some(perm => {
|
||||
const hasPerm = user.perms?.some(perm => {
|
||||
return requiredPerms.includes(perm)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user