From 06052ea48e8194ea6a9b854bd668c51083ec2b46 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 18 Aug 2022 13:54:56 +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=9B=A0=E5=AF=8C=E6=96=87=E6=9C=AC=E8=A7=86=E5=9B=BE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E8=BF=9B=E5=85=A5=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9A=84=E4=BB=AA=E8=A1=A8=E6=9D=BF=EF=BC=8C?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E4=BF=9D=E5=AD=98=E6=8C=89=E9=92=AE=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=8D=E5=AF=B9=E7=9A=84=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 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/canvas/custom-component/DeRichTextView.vue b/frontend/src/components/canvas/custom-component/DeRichTextView.vue index 27a62cad77..eb832c0478 100644 --- a/frontend/src/components/canvas/custom-component/DeRichTextView.vue +++ b/frontend/src/components/canvas/custom-component/DeRichTextView.vue @@ -66,6 +66,7 @@ export default { }, data() { return { + initReady: false, editShow: true, canEdit: false, // 初始化配置 @@ -115,19 +116,23 @@ export default { if (this.canEdit) { this.element.propValue.textValue = newValue } - this.$store.commit('canvasChange') + this.initReady||this.$store.commit('canvasChange') } }, mounted() { - bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect) - tinymce.init({}) - this.myValue = this.assignment(this.element.propValue.textValue) - bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) + this.viewInit() }, beforeDestroy() { bus.$off('fieldSelect-' + this.element.propValue.viewId) }, methods: { + viewInit(){ + bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect) + tinymce.init({}) + this.myValue = this.assignment(this.element.propValue.textValue) + bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange) + this.initReady=true + }, initCurFieldsChange() { if (!this.canEdit) { this.myValue = this.assignment(this.element.propValue.textValue)