bug修复
This commit is contained in:
1 parent
529c255e5b
commit
3893b25848
9 files changed
+2548
-247
No files matched your search
@@ -0,0 +1,24 @@
|
||||
/** 管理后台通用状态中文文案。 */
|
||||
const STATUS_LABELS: Record<string, string> = {
|
||||
DRAFT: "草稿",
|
||||
PUBLISHED: "已上架",
|
||||
OFFLINE: "已下架",
|
||||
ENABLED: "已启用",
|
||||
DISABLED: "已停用",
|
||||
ACTIVE: "正常",
|
||||
INACTIVE: "已停用",
|
||||
PENDING: "待处理",
|
||||
PROCESSING: "处理中",
|
||||
SUCCESS: "成功",
|
||||
FAILED: "失败",
|
||||
SENT: "已发送",
|
||||
READ: "已读",
|
||||
UNREAD: "未读",
|
||||
DELETED: "已删除",
|
||||
};
|
||||
|
||||
/** 将接口状态值统一转换为中文,未知状态显示为“未知状态”。 */
|
||||
export function statusLabel(status?: string): string {
|
||||
if (!status) return "未知状态";
|
||||
return STATUS_LABELS[status.toUpperCase()] || "未知状态";
|
||||
}
|
||||
Reference in new issue
Block a user