权限相关调整
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* @see https://gitee.com/dotnetmoyu/SimpleAdmin
|
||||
*/
|
||||
import { useAuthStore } from "@/stores/modules/auth";
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
import type { Directive, DirectiveBinding } from "vue";
|
||||
|
||||
/**
|
||||
@@ -32,6 +33,8 @@ const auth: Directive = {
|
||||
const { value, arg } = binding;
|
||||
// 获取authStore
|
||||
const authStore = useAuthStore();
|
||||
const userStore = useUserStore();
|
||||
if ((userStore.userInfoGet?.roleCodeList || []).includes("superAdmin")) return;
|
||||
// 获取用户权限按钮列表
|
||||
const currentPageRoles = authStore.authButtonListGet ?? [];
|
||||
// 如果传入的值是数组,并且数组的长度大于0
|
||||
|
||||
Reference in New Issue
Block a user