mirror of
https://github.com/dataease/dataease.git
synced 2025-02-28 15:12:52 +08:00
10 lines
257 B
JavaScript
10 lines
257 B
JavaScript
![]() |
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
|
||
|
}
|