优化 bpmnProcessDesigner 在编辑流程图时,自动延迟赋值 key 和 name,保证一致性

This commit is contained in:
YunaiV 2022-01-03 18:45:38 +08:00
parent db54147697
commit ed33ff9f04

View File

@ -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');
},