mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
优化 bpmnProcessDesigner 在编辑流程图时,自动延迟赋值 key 和 name,保证一致性
This commit is contained in:
parent
db54147697
commit
ed33ff9f04
@ -58,13 +58,24 @@ export default {
|
||||
this.$nextTick(() => this.resetBaseInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 'model.key': {
|
||||
// immediate: false,
|
||||
// handler: function (val) {
|
||||
// this.handleKeyUpdate(val)
|
||||
// }
|
||||
// }
|
||||
},
|
||||
created() {
|
||||
// 获得流程表单的下拉框的数据
|
||||
getSimpleForms().then(response => {
|
||||
this.forms = response.data
|
||||
})
|
||||
// 针对上传的 bpmn 流程图时,需要延迟 1 秒的时间,保证 key 和 name 的更新
|
||||
setTimeout(() => {
|
||||
this.handleKeyUpdate(this.model.key)
|
||||
this.handleNameUpdate(this.model.name)
|
||||
}, 1000)
|
||||
},
|
||||
methods: {
|
||||
resetBaseInfo() {
|
||||
@ -87,6 +98,9 @@ export default {
|
||||
this.updateBaseInfo('id');
|
||||
},
|
||||
handleNameUpdate(value) {
|
||||
if (!value) {
|
||||
return
|
||||
}
|
||||
this.elementBaseInfo['name'] = value;
|
||||
this.updateBaseInfo('name');
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user