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 18:28:47 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c751b0b01ccc2e48ee94f94e4508364b396b3ae8
c751b0b0
1 parent
e7edde3f
fix
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
39 deletions
doc/App.vue
doc/App.vue
View file @
c751b0b
...
...
@@ -93,7 +93,7 @@
<span class="name">节点名称</span>
<span class="node-index"> 节点索引:{{ state.node_idx }} </span>
</div>
<el-input v-model="state.node_name" style="margin-top: 5px;" />
<el-input v-model="state.node_name"
@input="handleNodeNameChange"
style="margin-top: 5px;" />
</el-form-item>
<div v-if="state.user_attr_set" class="node-user">
<div class="name">节点负责人</div>
...
...
@@ -1114,6 +1114,11 @@ export default {
}
/******************* END *******************/
const handleNodeNameChange = (val) => {
state.detailModel.text = val; // 更新节点名称显示
editor.updateModel(state.detailModel); // 更新流程图信息
}
/***************** 用户选择控件弹框 ****************/
/**
...
...
@@ -1373,24 +1378,25 @@ export default {
*
*/
function cancel() {
if (!checkFormEdited()) {
ElMessageBox.confirm(
'您刚才修改过表单内容还未保存,是否离开?',
'温馨提示',
{
confirmButtonText: '离开',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
editor.closeModel()
})
.catch(() => {
})
} else {
editor.closeModel()
}
// if (!checkFormEdited()) {
// ElMessageBox.confirm(
// '您刚才修改过表单内容还未保存,是否离开?',
// '温馨提示',
// {
// confirmButtonText: '离开',
// cancelButtonText: '取消',
// type: 'warning',
// }
// )
// .then(() => {
// editor.closeModel()
// })
// .catch(() => {
// })
// } else {
// editor.closeModel()
// }
editor.closeModel()
}
/**
...
...
@@ -1630,26 +1636,28 @@ export default {
}
function onClickCanvas(e: myEvent) {
if (!checkFormEdited() && state.detailModel) {
ElMessageBox.confirm(
'您刚才修改过表单内容还未保存,是否离开?',
'温馨提示',
{
confirmButtonText: '离开',
cancelButtonText: '取消',
type: 'warning',
}
)
.then(() => {
state.detailModel = null;
editor.closeModel()
})
.catch(() => {
})
} else {
state.detailModel = null;
editor.closeModel()
}
// if (!checkFormEdited() && state.detailModel) {
// ElMessageBox.confirm(
// '您刚才修改过表单内容还未保存,是否离开?',
// '温馨提示',
// {
// confirmButtonText: '离开',
// cancelButtonText: '取消',
// type: 'warning',
// }
// )
// .then(() => {
// state.detailModel = null;
// editor.closeModel()
// })
// .catch(() => {
// })
// } else {
// state.detailModel = null;
// editor.closeModel()
// }
state.detailModel = null;
editor.closeModel()
}
const checkFormEdited = () => { // 检查表单是否修改过内容
...
...
@@ -1871,6 +1879,8 @@ export default {
onAuthAllEditChange,
onSearchAuthInput,
handleNodeNameChange,
openUserForm,
onCloseUserView,
onConfirmUserView,
...
...
Please
register
or
login
to post a comment