dataease-dm/frontend/src/utils/permission.js

10 lines
257 B
JavaScript
Raw Normal View History

2021-03-10 18:26:53 +08:00
import store from '@/store'
export function checkPermission(pers) {
const permissions = store.getters.permissions
const hasPermission = pers.every(needP => {
const result = permissions.includes(needP)
return result
})
return hasPermission
}