Skip to content

Commit

Permalink
flow line bug
Browse files Browse the repository at this point in the history
  • Loading branch information
孟子文 committed Sep 1, 2021
1 parent 8a29c9b commit 137c779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package/vitevui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vitevui",
"version": "1.0.0-beta.56",
"version": "1.0.0-beta.57",
"description": "vue3.0 ui",
"main": "lib/index.js",
"homepage": "https://bhabgs.github.io/vite-vui-docs/",
Expand Down
5 changes: 3 additions & 2 deletions package/vitevui/src/flow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,13 @@ const viFlow = defineComponent({
});
this.graph.on('edge:click', (arg: any) => {
this.selectedObj = arg.edge;
this.diaObj = JSON.parse(JSON.stringify(this.selectedObj.store.data));
const id = this.diaObj.source.cell;
const line = this.selectedObj.store.data;
const id = line.source.cell;
const node = this.graph.getCellById(id);
const type = node.store.data.data.nodeType;
if (type === 'SELECTOR' || type === 'SWITCH') {
this.selectedObj.setData({ nodeType: `${type}Line` });
this.diaObj = JSON.parse(JSON.stringify(this.selectedObj.store.data));
this.diaVisible = true;
}
});
Expand Down

0 comments on commit 137c779

Please sign in to comment.