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 });