From 2ffad690a047dd488c186b87a48396f2bd16cd71 Mon Sep 17 00:00:00 2001 From: jiangchu Date: Sun, 31 Mar 2024 23:28:12 +0800 Subject: [PATCH] :bug: fix: bug --- .../caseShow/demos/pipeline/multiPipe/data.ts | 54 ------------------- .../demos/pipeline/multiPipe/pipelineDemo.tsx | 4 +- .../demos/pipeline/techPipe/techPipeline.tsx | 4 +- .../demos/flowViewIntro/dragableNode.tsx | 2 +- 4 files changed, 5 insertions(+), 59 deletions(-) diff --git a/docs/caseShow/demos/pipeline/multiPipe/data.ts b/docs/caseShow/demos/pipeline/multiPipe/data.ts index 13df334..77ba116 100644 --- a/docs/caseShow/demos/pipeline/multiPipe/data.ts +++ b/docs/caseShow/demos/pipeline/multiPipe/data.ts @@ -138,39 +138,6 @@ export const nodes = [ des: '未开始', }, }, - // { - // id: 'a7', - // type: 'pipeNode', - // width: nodeWidth, - // height: nodeHeight, - // data: { - // title: '同步至埋点平台', - // logo: 'https://mdn.alipayobjects.com/huamei_d2ejos/afts/img/A*Em_PQoTrMDgAAAAAAAAAAAAADvl6AQ/original', - // des: '未开始', - // }, - // }, - // { - // id: 'a8', - // type: 'pipeNode', - // width: nodeWidth, - // height: nodeHeight, - // data: { - // title: '同步至埋点平台', - // logo: 'https://mdn.alipayobjects.com/huamei_d2ejos/afts/img/A*Em_PQoTrMDgAAAAAAAAAAAAADvl6AQ/original', - // des: '未开始', - // }, - // }, - // { - // id: 'a9', - // type: 'pipeNode', - // width: nodeWidth, - // height: nodeHeight, - // data: { - // title: '同步至埋点平台', - // logo: 'https://mdn.alipayobjects.com/huamei_d2ejos/afts/img/A*Em_PQoTrMDgAAAAAAAAAAAAADvl6AQ/original', - // des: '未开始', - // }, - // }, ]; export const edges = [ @@ -182,27 +149,6 @@ export const edges = [ sourceHandle: 'a1', targetHandle: 'a2', }, - // { - // id: 'e1-a7', - // source: 'a1', - // target: 'a7', - // sourceHandle: 'a1-NPM 组件初始化-source', - // targetHandle: 'a7', - // }, - // { - // id: 'e1-a8', - // source: 'a1', - // target: 'a8', - // sourceHandle: 'a1-NPM 组件初始化-source', - // targetHandle: 'a8', - // }, - // { - // id: 'e1-a9', - // source: 'a1', - // target: 'a9', - // sourceHandle: 'a1-NPM 组件初始化-source', - // targetHandle: 'a9', - // }, { id: 'e2', source: 'a2', diff --git a/docs/caseShow/demos/pipeline/multiPipe/pipelineDemo.tsx b/docs/caseShow/demos/pipeline/multiPipe/pipelineDemo.tsx index 0cfac13..782cdb1 100644 --- a/docs/caseShow/demos/pipeline/multiPipe/pipelineDemo.tsx +++ b/docs/caseShow/demos/pipeline/multiPipe/pipelineDemo.tsx @@ -19,8 +19,8 @@ const nodeTypes = { pipeNode: PipeNode }; function App() { const flowViewer = useFlowViewer(); const { styles } = useStyles(); - const [_nodes, setNodes, onNodesChange] = useNodesState([...nodes]); - const [_edges, setEdges, onEdgesChange] = useEdgesState([...edges]); + const [_nodes, , onNodesChange] = useNodesState([...nodes]); + const [_edges, , onEdgesChange] = useEdgesState([...edges]); const handleClick = useCallback( (e, n) => { diff --git a/docs/caseShow/demos/pipeline/techPipe/techPipeline.tsx b/docs/caseShow/demos/pipeline/techPipe/techPipeline.tsx index 25b1394..3062263 100644 --- a/docs/caseShow/demos/pipeline/techPipe/techPipeline.tsx +++ b/docs/caseShow/demos/pipeline/techPipe/techPipeline.tsx @@ -20,8 +20,8 @@ const nodeTypes = { pipeNode: PipeNode }; function App() { const flowViewer = useFlowViewer(); const { styles } = useStyles(); - const [_nodes, setNodes, onNodesChange] = useNodesState([...nodes]); - const [_edges, setEdges, onEdgesChange] = useEdgesState([...edges]); + const [_nodes, , onNodesChange] = useNodesState([...nodes]); + const [_edges, , onEdgesChange] = useEdgesState([...edges]); const handleClick = useCallback( (e, n) => { diff --git a/docs/guide/demos/flowViewIntro/dragableNode.tsx b/docs/guide/demos/flowViewIntro/dragableNode.tsx index df7d212..1a4a2c6 100644 --- a/docs/guide/demos/flowViewIntro/dragableNode.tsx +++ b/docs/guide/demos/flowViewIntro/dragableNode.tsx @@ -8,7 +8,7 @@ import { nodes as _nodes, edges } from './data/data2'; function App() { const { styles } = useStyles(); - const [nodes, setNodes, onNodesChange] = useNodesState(_nodes); + const [nodes, , onNodesChange] = useNodesState(_nodes); return (