mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-26 08:55:07 +08:00
替换var 为const/let
删除未使用import 替换 == 为 ===
This commit is contained in:
@ -15,10 +15,8 @@ export function checkPermi(value) {
|
||||
return all_permission === permission || permissionDatas.includes(permission)
|
||||
})
|
||||
|
||||
if (!hasPermission) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return hasPermission;
|
||||
|
||||
} else {
|
||||
console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
|
||||
return false
|
||||
@ -40,12 +38,10 @@ export function checkRole(value) {
|
||||
return super_admin === role || permissionRoles.includes(role)
|
||||
})
|
||||
|
||||
if (!hasRole) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
return hasRole;
|
||||
|
||||
} else {
|
||||
console.error(`need roles! Like checkRole="['admin','editor']"`)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user