Skip to content

Commit

Permalink
feat: 发布 beta 版本
Browse files Browse the repository at this point in the history
  • Loading branch information
lhbxs committed Jan 16, 2025
1 parent 8fff21e commit d0164a5
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/x-flow/src/models/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,9 @@ const createStore = (initProps?: Partial<FlowProps>) => {
setNodes: (nodes, isTransform = true) => {
set({ nodes: isTransform ? transformNodes(nodes) : nodes });
},
getNodes: () => {
const nodes = get().nodes;
const result = nodes.map(item => {
const { data, ...rest } = item;
const { _nodeType, ...restData } = data;
return {
...rest,
data: restData
}
});
return result;
},
setEdges: edges => {
set({ edges });
},
getEdges: () => {
return get().edges;
},
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 d0164a5

Please sign in to comment.