From 57e33781d18c8d04fdbe0301ce06f3e4cf1f8752 Mon Sep 17 00:00:00 2001
From: TsMask <340112800@qq.com>
Date: Wed, 4 Dec 2024 17:48:39 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E5=B8=83=E5=B1=80?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/hooks/business/auth.ts | 4 +-
src/layouts/modules/global-header/index.vue | 2 +-
src/store/modules/auth/shared.ts | 1 -
src/theme/settings.ts | 8 +--
src/typings/api.d.ts | 1 -
src/views/function/toggle-auth/index.vue | 61 +--------------------
6 files changed, 8 insertions(+), 69 deletions(-)
diff --git a/src/hooks/business/auth.ts b/src/hooks/business/auth.ts
index d324223..9baeb0b 100644
--- a/src/hooks/business/auth.ts
+++ b/src/hooks/business/auth.ts
@@ -9,10 +9,10 @@ export function useAuth() {
}
if (typeof codes === 'string') {
- return authStore.userInfo.buttons.includes(codes);
+ return authStore.userInfo.permissions.includes(codes);
}
- return codes.some(code => authStore.userInfo.buttons.includes(code));
+ return codes.some(code => authStore.userInfo.permissions.includes(code));
}
function hasRole(role: string | string[]) {
diff --git a/src/layouts/modules/global-header/index.vue b/src/layouts/modules/global-header/index.vue
index 05a4bf0..d5550ea 100644
--- a/src/layouts/modules/global-header/index.vue
+++ b/src/layouts/modules/global-header/index.vue
@@ -57,7 +57,7 @@ const headerMenus = computed(() => {