This commit is contained in:
sjl
2024-11-21 10:05:44 +08:00
parent b992b2653a
commit 4de59336b2
17 changed files with 224 additions and 76 deletions

View File

@@ -10,8 +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)
// 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()