feat(waf): 规则编辑器节点自定义命名与拖放添加

对齐后端 label 字段;属性栏可编辑显示名称;节点库改为拖到画布落点创建。
This commit is contained in:
ryan
2026-07-19 11:01:24 +08:00
parent 4166cc9861
commit b5e27fabde
10 changed files with 653 additions and 57 deletions
+12 -1
View File
@@ -783,31 +783,42 @@ export type WAFRuleNode =
| {
id: string;
type: 'start';
label?: string;
position: XYPosition;
config: Record<string, never>;
}
| {
id: string;
type: 'ip_match';
label?: string;
position: XYPosition;
config: IPMatchConfig;
}
| {
id: string;
type: 'geo_match';
label?: string;
position: XYPosition;
config: GeoMatchConfig;
}
| { id: string; type: 'pow'; position: XYPosition; config: PoWNodeConfig }
| {
id: string;
type: 'pow';
label?: string;
position: XYPosition;
config: PoWNodeConfig;
}
| {
id: string;
type: 'allow';
label?: string;
position: XYPosition;
config: Record<string, never>;
}
| {
id: string;
type: 'block';
label?: string;
position: XYPosition;
config: BlockNodeConfig;
};