update
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
2025-09-25 20:48:09 +08:00
parent f7b8ef8978
commit 4ff5822ef8
3 changed files with 35 additions and 11 deletions

View File

@@ -131,17 +131,17 @@ export function debounce<T extends (...args: any[]) => any>(
export function getUserRole(role: User["admin_type"]): {
type: "default" | "info" | "error"
tagString: "普通" | "管理员" | "超管"
label: "普通" | "管理员" | "超管"
} {
const roleMap = {
[USER_TYPE.REGULAR_USER]: {
type: "default" as const,
tagString: "普通" as const,
label: "普通" as const,
},
[USER_TYPE.ADMIN]: { type: "info" as const, tagString: "管理员" as const },
[USER_TYPE.ADMIN]: { type: "info" as const, label: "管理员" as const },
[USER_TYPE.SUPER_ADMIN]: {
type: "error" as const,
tagString: "超管" as const,
label: "超管" as const,
},
}