Skip to content

Commit

Permalink
chore: 删掉 store 的
Browse files Browse the repository at this point in the history
  • Loading branch information
youngjuning committed Jan 16, 2025
1 parent e0d60e4 commit 4a175ac
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/x-flow/src/models/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,9 @@ const createStore = (initProps?: Partial<FlowProps>) => {
setNodes: (nodes, isTransform = true) => {
set({ nodes: isTransform ? transformNodes(nodes) : nodes });
},
getNodes: () => {
return get().nodes;
},
setEdges: edges => {
set({ edges });
},
getEdges: () => {
return get().nodes;
},
addNodes: (payload, isTransform = true) => {
const newNodes = get().nodes.concat(isTransform ? transformNodes(Array.isArray(payload) ? payload : [payload]) : payload);
set({ nodes: newNodes });
Expand Down

0 comments on commit 4a175ac

Please sign in to comment.