20260724173425

This commit is contained in:
oneao committed 2026-07-24 17:34:26 +08:00
1 parent 4f40ad9f11
commit b33c743236
27 files changed
+1310 -437

No files matched your search

+6 -3
View File
@@ -13,7 +13,11 @@ export const usePermissionStore = defineStore("permissions", () => {
const powerSet = computed(() => new Set(powerCodes.value));
const isG3soft = computed(() => {
const authStore = useAuthStore();
return String(authStore.user?.account || "").trim().toLowerCase() === "g3soft";
return (
String(authStore.user?.account || "")
.trim()
.toLowerCase() === "g3soft"
);
});
async function load() {
@@ -65,8 +69,7 @@ export const usePermissionStore = defineStore("permissions", () => {
function canPower(moduleCode, powerCode) {
return (
isG3soft.value ||
(canModule(moduleCode) && powerSet.value.has(`${moduleCode}.${powerCode}`))
isG3soft.value || (canModule(moduleCode) && powerSet.value.has(`${moduleCode}.${powerCode}`))
);
}