Commit ea838479 authored by wuyongsheng's avatar wuyongsheng

fix: 不可拖动修改

parent 185c5b56
...@@ -434,9 +434,9 @@ const Flow = (props: IProps) => { ...@@ -434,9 +434,9 @@ const Flow = (props: IProps) => {
}; };
/** node节点 */ /** node节点 */
const [nodes, setNodes] = useNodesState(initialNodes); const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);
/** 连线数组 */ /** 连线数组 */
const [edges, setEdges] = useEdgesState(initialEdges); const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);
useEffect(() => { useEffect(() => {
setEdges(initialEdges); setEdges(initialEdges);
...@@ -638,15 +638,15 @@ const Flow = (props: IProps) => { ...@@ -638,15 +638,15 @@ const Flow = (props: IProps) => {
[setSelectedBatchNodeId] [setSelectedBatchNodeId]
); );
const onNodesChange = (val: any)=>{ // const onNodesChange = (val: any)=>{
// 自定义change事件 不允许react flow组件本身删除事件 // // 自定义change事件 不允许react flow组件本身删除事件
return // // return
} // }
const onEdgesChange = (val: any) =>{ // const onEdgesChange = (val: any) =>{
// 自定义change事件 不允许react flow组件本身删除事件 // // 自定义change事件 不允许react flow组件本身删除事件
return; // // return;
} // }
const reactFlowParams = const reactFlowParams =
flowType === "edit" flowType === "edit"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment