From ed33ff9f046a7d432099fe162b92cd8e7da29622 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 3 Jan 2022 18:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20bpmnProcessDesigner=20?= =?UTF-8?q?=E5=9C=A8=E7=BC=96=E8=BE=91=E6=B5=81=E7=A8=8B=E5=9B=BE=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E8=87=AA=E5=8A=A8=E5=BB=B6=E8=BF=9F=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=20key=20=E5=92=8C=20name=EF=BC=8C=E4=BF=9D=E8=AF=81=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../package/penal/base/ElementBaseInfo.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/yudao-admin-ui/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue b/yudao-admin-ui/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue index 761b483b5..645e57035 100644 --- a/yudao-admin-ui/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue +++ b/yudao-admin-ui/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue @@ -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'); },