feat: 优化规则管理功能

- 移动保存按钮到字段配置区域
- 添加规则编辑功能,支持更新和另存为
- 编辑模式下显示编辑状态标识
- 保存时检查规则名称重复,支持覆盖保存
- 优化弹窗样式,统一风格
- 更换加载图标为 FolderOpen
- 添加搜索防抖和错误处理
- 添加国际化文本
This commit is contained in:
雨霖铃
2026-06-06 23:08:05 +08:00
parent a2e07a9115
commit 6c7b7294b4
6 changed files with 654 additions and 148 deletions
+8
View File
@@ -33,6 +33,14 @@ export function getById(id: string): DataRule | undefined {
return rules.find((rule) => rule.id === id);
}
/**
* 根据名称获取规则
*/
export function getByName(name: string): DataRule | undefined {
const rules = getAll();
return rules.find((rule) => rule.name === name);
}
/**
* 获取规则数量
*/