From 31649d0370012e26102decebbe3b077a2409587f Mon Sep 17 00:00:00 2001 From: ZLY Date: Sun, 19 Oct 2025 10:26:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(flowEditor):=20=E6=9B=B4=E6=96=B0=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=B1=BB=E5=9E=8B=E5=92=8C=E7=BB=84=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FlowEditor/node/switchNode/SwitchNode.tsx | 4 ++-- src/pages/flowEditor/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/FlowEditor/node/switchNode/SwitchNode.tsx b/src/components/FlowEditor/node/switchNode/SwitchNode.tsx index 541c3a6..dab8628 100644 --- a/src/components/FlowEditor/node/switchNode/SwitchNode.tsx +++ b/src/components/FlowEditor/node/switchNode/SwitchNode.tsx @@ -7,7 +7,7 @@ import NodeContentSwitch from '@/pages/flowEditor/components/nodeContentSwitch'; import { defaultNodeTypes } from '@/components/FlowEditor/node/types/defaultType'; // 循环节点组件,用于显示循环开始和循环结束节点 -const LoopNode = ({ data, id }: { data: defaultNodeTypes; id: string }) => { +const SwitchNode = ({ data, id }: { data: defaultNodeTypes; id: string }) => { const [newData, setNewData] = useState([]); const title = data.title || '条件选择'; @@ -154,4 +154,4 @@ const LoopNode = ({ data, id }: { data: defaultNodeTypes; id: string }) => { ); }; -export default LoopNode; \ No newline at end of file +export default SwitchNode; \ No newline at end of file diff --git a/src/pages/flowEditor/index.tsx b/src/pages/flowEditor/index.tsx index 9d75c7e..56cb251 100644 --- a/src/pages/flowEditor/index.tsx +++ b/src/pages/flowEditor/index.tsx @@ -149,7 +149,7 @@ const FlowEditor: React.FC<{ initialData?: any, useDefault?: boolean }> = ({ ini const onNodeDoubleClick = useCallback( (event: React.MouseEvent, node: Node) => { // 不可编辑的类型 - if (['AND', 'OR', 'JSON2STR', 'STR2JSON'].includes(node.type)) return; + if (['AND', 'OR', 'JSON2STR', 'STR2JSON', 'IMAGE', 'RESULT'].includes(node.type)) return; // 循环开始的节点不展示编辑框 if (['LOOP_START'].includes(node.data.type as string)) return; setEditingNode(node);