检测脚本
This commit is contained in:
@@ -10,6 +10,8 @@ const auth: Directive = {
|
||||
const { value } = binding
|
||||
const authStore = useAuthStore()
|
||||
const currentPageRoles = authStore.authButtonListGet[authStore.routeName] ?? []
|
||||
console.log('1234',authStore.routeName)
|
||||
console.log('123',currentPageRoles)
|
||||
if (value instanceof Array && value.length) {
|
||||
const hasPermission = value.every(item => currentPageRoles.includes(item))
|
||||
if (!hasPermission) el.remove()
|
||||
|
||||
Reference in New Issue
Block a user