From 05ee30c39adb006cfda5fc331a0e5255f2ffd3d2 Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 12 Jul 2024 15:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=9D=E6=9C=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/mianview/mixin.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/views/system/mianview/mixin.js b/src/views/system/mianview/mixin.js index 4590bfe..41a23f1 100644 --- a/src/views/system/mianview/mixin.js +++ b/src/views/system/mianview/mixin.js @@ -21,15 +21,20 @@ export default { const page = this.editor.getCurrentPage(); // 获取所选对象 const selectedItem = page.getSelected()[0]; - console.log(this.edgeAttributeForm); - if(this.edgeAttributeForm.keyword){ - this.edgeAttributeForm.label = { - text: this.edgeAttributeForm.label, + + let newObj = JSON.parse(JSON.stringify(this.edgeAttributeForm)) + if(newObj.keyword){ + newObj.label = { + text: newObj.label, fill: 'red' } + // this.edgeAttributeForm.label = { + // text: this.edgeAttributeForm.label, + // fill: 'red' + // } } page.update(selectedItem.id, { - label: this.edgeAttributeForm.label, + label: newObj.label, shape: this.edgeAttributeForm.shape, keyword: this.edgeAttributeForm.keyword });