Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2024-02-23 17:06:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c24c6dbfb44883d467fe9f6410150a234276e285
c24c6dbf
1 parent
c9f790b3
fix 优化点击预览时,主流程显示保持不变
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
doc/App.vue
package.json
doc/App.vue
View file @
c24c6db
...
...
@@ -554,7 +554,7 @@ import qs from 'qs'
import { after } from 'lodash-es';
// import { VueSpinner } from 'vue3-spinners';
import { flowVersionAPI, saveFlowAPI, flowNodesAPI, enableFlowVersionAPI, flowNodePropertyAPI, checkAllFlowNodePropertyAPI, saveAllFlowNodePropertyAPI, saveNodeSortAPI } from "./api";
import draggable from 'vuedraggable'
import draggable from 'vuedraggable'
;
const G6 = (window as any).G6.default as any
...
...
@@ -2305,12 +2305,39 @@ export default {
}
}
const getRowData = async (flow_id: any) => {
rawFlowData.value = null;
state.reloadLoading = true; // 打开loading
const { code, data } = await flowNodesAPI({ flow_id });
if (code) {
state.reloadLoading = false;
let { nodes, edges } = data;
nodes = nodes.map((node: any) => {
node.text = node.text.slice(0, 8);
return node;
});
// 没有流程图数据
if (!nodes.length && !edges.length) {
rawFlowData.value = AppData; // 设置默认的数据
} else {
rawFlowData.value = { nodes, edges }; // 获取已存在的数据
// 内部刷新graph数据
nextTick(() => {
editor1?.editorState.graph?.read(rawFlowData.value)
});
}
} else {
state.reloadLoading = false;
}
}
const openPreview = () => {
// 打开弹框
state.dialogPreviewVisible = true;
// 获取最新数据
let flow_id = getFlowId(); // flow_id 流程ID
get
Fl
owData(flow_id);
get
R
owData(flow_id);
// 创建一个resize事件
const resizeEvent = new Event('resize');
...
...
package.json
View file @
c24c6db
...
...
@@ -14,9 +14,7 @@
"remove_dist"
:
"rm -rf custom_flow"
,
"dev_upload"
:
"npm run build_tar && npm run scp-dev && npm run dec-dev && npm run remove_tar && npm run remove_dist"
},
"repository"
:
{
"gitee"
:
"https://gitee.com/martsforever-pot/vue-flow-editor"
},
"repository"
:
{},
"files"
:
[
"docs"
],
...
...
Please
register
or
login
to post a comment