update RolePermissionAssign style
This commit is contained in:
@@ -50,6 +50,7 @@ import type { DropdownOption, DropdownValue } from "tdesign-mobile-vue";
|
||||
import { Toast } from "tdesign-mobile-vue";
|
||||
import { type Permission, useUserStore } from "timi-web";
|
||||
import { type Role, usePermissionSettingsStore } from "@/store/permissionSettingsStore";
|
||||
import { getErrorMessage } from "@/utils/error";
|
||||
import { corePermissionCodes, coreRoleCodes } from "@/utils/permission";
|
||||
|
||||
defineOptions({
|
||||
@@ -188,16 +189,6 @@ async function loadAuthorizationScope(): Promise<void> {
|
||||
candidateRoleList.value = roleList;
|
||||
}
|
||||
|
||||
function getErrorMessage(error: unknown, fallback: string): string {
|
||||
if (error instanceof Error && error.message) {
|
||||
return error.message;
|
||||
}
|
||||
if (typeof error === "string" && error) {
|
||||
return error;
|
||||
}
|
||||
return fallback;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await permissionStore.loadAll();
|
||||
await loadAuthorizationScope();
|
||||
|
||||
Reference in New Issue
Block a user