Commit ea838479 authored by wuyongsheng's avatar wuyongsheng

fix: 不可拖动修改

parent 185c5b56
......@@ -434,9 +434,9 @@ const Flow = (props: IProps) => {
};
/** node节点 */
const [nodes, setNodes] = useNodesState(initialNodes);
const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);
/** 连线数组 */
const [edges, setEdges] = useEdgesState(initialEdges);
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);
useEffect(() => {
setEdges(initialEdges);
......@@ -638,15 +638,15 @@ const Flow = (props: IProps) => {
[setSelectedBatchNodeId]
);
const onNodesChange = (val: any)=>{
// 自定义change事件 不允许react flow组件本身删除事件
return
}
// const onNodesChange = (val: any)=>{
// // 自定义change事件 不允许react flow组件本身删除事件
// // return
// }
const onEdgesChange = (val: any) =>{
// 自定义change事件 不允许react flow组件本身删除事件
return;
}
// const onEdgesChange = (val: any) =>{
// // 自定义change事件 不允许react flow组件本身删除事件
// // return;
// }
const reactFlowParams =
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