更新敏感词管理模块:将操作类型参数类型从字符串改为数字,以提高类型安全性和代码可读性。

This commit is contained in:
超级老白兔
2025-09-28 16:37:58 +08:00
parent 0ae2265c50
commit 1bd3883b18

View File

@@ -58,17 +58,17 @@ const SensitiveWordManagement = forwardRef<any, Record<string, never>>(
};
// 操作类型映射
const getOperationText = (operation: string) => {
const getOperationText = (operation: number) => {
switch (operation) {
case "0":
case 0:
return "不操作";
case "1":
case 1:
return "替换";
case "2":
case 2:
return "删除";
case "3":
case 3:
return "警告";
case "4":
case 4:
return "禁止发送";
default:
return "未知操作";