fix(permission/index.ts): 权限指令添加用户权限集合非空判断

Former-commit-id: 32552c4488c47b6113a23c2c0f864bb2de908bfe
This commit is contained in:
郝先瑞
2022-04-29 21:51:24 +08:00
parent c00ab555dc
commit a72a64aff3

View File

@@ -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)
})