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
2023-12-05 10:28:28 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f3ac9cf89d7590a47f5bbd259f2721af33d4f360
f3ac9cf8
1 parent
f8f5b168
调整保存按钮位置
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
doc/App.vue
doc/App.vue
View file @
f3ac9cf
...
...
@@ -297,18 +297,21 @@
<span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">复制</span>
</div>
</el-tooltip>
<el-tooltip content="保存流程图数据">
<
!-- <
el-tooltip content="保存流程图数据">
<div class="vue-flow-editor-toolbar-item" @click="saveData">
<i class="el-icon-coin" style=" margin-top: 4px;" />
<span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">保存流程</span>
</div>
</el-tooltip>
</el-tooltip>
-->
<!-- <el-tooltip content="启用流程图数据">
<div class="vue-flow-editor-toolbar-item" @click="startFlow">
<i class="el-icon-check" style=" margin-top: 4px;" />
<span style="font-size: 12px; transform: scale(0.8); margin-top: 2px;">启用</span>
</div>
</el-tooltip> -->
<div style="position: absolute; top: 15px; right: 160px; width: 80px;">
<div @click="saveData" style="border: 1px solid #009688; width: 100%; height: 25px; border-radius: 5px; color: #009688; text-align: center; line-height: 25px; cursor: pointer;">保存</div>
</div>
<div class="select-version-wrapper">
<el-dropdown trigger="click">
<div class="select-version-show">
...
...
@@ -411,12 +414,12 @@
</el-dialog>
</template>
<!-- 表单底部按钮 -->
<template v-slot:foot>
<
!-- <
template v-slot:foot>
<div v-if="state.main_attr_set" style="width: 100%; text-align: center;">
<el-button type="primary" color="#009688" @click="saveForm" style="width: 40%;">保存</el-button>
<el-button @click="cancel" style="width: 40%;">关闭</el-button>
</div>
</template>
</template>
-->
</vue-flow-editor>
<div v-if="state.reloadLoading" style="position: absolute; top: 0; right: 0; left: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.5);width: 100%; height: 100%; z-index: 2006;">
<div class="el-loading-spinner">
...
...
@@ -1573,9 +1576,6 @@ export default {
}
})
});
console.warn(state.node_attr);
console.warn({name: state.node_name, user: state.userTags, field: state.field_extend, property: state.more_attr});
return _.isEqual(state.node_attr, {name: state.node_name, user: state.userTags, field: state.field_extend, property: state.more_attr})
}
...
...
@@ -1609,7 +1609,26 @@ export default {
*
* @return {void} No return value.
*/
function saveData(type): void {
function saveData(): void {
// 如果表单打开状态,走表单保存逻辑
if (state.detailModel) {
ElMessageBox.confirm(
'是否确定保存流程图?',
'温馨提示',
{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(async () => {
saveForm();
})
.catch(() => {
});
return;
}
let { nodes, edges } = editor.editorState.graph.save();
// 使用时需要把自定义节点的类型带过去 activity/control
...
...
Please
register
or
login
to post a comment