From db61cce94bc48e650045dd0631f67d7248ff04fc Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Mon, 26 Sep 2022 11:49:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=8C=E6=96=87=E6=9C=AC=E8=A7=86=E5=9B=BE=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E5=80=BC=E8=A2=AB=E5=9B=BA=E5=AE=9A=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../canvas/custom-component/DeRichTextView.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/DeRichTextView.vue b/frontend/src/components/canvas/custom-component/DeRichTextView.vue index 1c78d8ac4f..006caeee76 100644 --- a/frontend/src/components/canvas/custom-component/DeRichTextView.vue +++ b/frontend/src/components/canvas/custom-component/DeRichTextView.vue @@ -69,6 +69,7 @@ export default { data() { return { initReady: false, + editReady: false, editShow: true, canEdit: false, // 初始化配置 @@ -109,6 +110,9 @@ export default { // 监听内容变化 active(val) { if (!val) { + if (this.canEdit) { + this.element.propValue.textValue = this.myValue + } this.canEdit = false this.reShow() this.myValue = this.assignment(this.element.propValue.textValue) @@ -117,9 +121,6 @@ export default { } }, myValue(newValue) { - if (this.canEdit) { - this.element.propValue.textValue = newValue - } this.initReady&&this.$store.commit('canvasChange') } }, @@ -195,6 +196,8 @@ export default { this.canEdit = true this.element['editing'] = true this.myValue = this.element.propValue.textValue + const ed = tinymce.editors[this.tinymceId] + ed.setContent(this.myValue) this.reShow() } },