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);