From b9ffb379c89c3d222605fd221ec605981eb61b76 Mon Sep 17 00:00:00 2001 From: toesbieya <1647775459@qq.com> Date: Fri, 3 Jul 2020 11:13:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/components/TinymceEditor/index.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vue/src/components/TinymceEditor/index.vue b/vue/src/components/TinymceEditor/index.vue index 53ff9ed..8a12aae 100644 --- a/vue/src/components/TinymceEditor/index.vue +++ b/vue/src/components/TinymceEditor/index.vue @@ -75,7 +75,8 @@ height: ctx.height, init_instance_callback(editor) { ctx.hasInit = true - editor.setContent(this.value || '') + editor.setContent(ctx.value || '') + editor.mode.set(ctx.readonly ? 'readonly' : 'design') }, setup(editor) { editor.on('keyup undo redo', () => { @@ -101,7 +102,7 @@ }, mounted() { - !this.readonly && this.init() + this.init() }, beforeDestroy() {