From 4849a0d7ca77afd3a486177c212ffca0d858e883 Mon Sep 17 00:00:00 2001 From: zhangjun1 Date: Mon, 26 Oct 2020 11:55:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E6=8F=92=E5=85=A5?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wangE.vue | 4 ++++ src/components/wangEBd.vue | 6 +++++- src/pages/technical-support/answer-center/detail.vue | 2 +- src/pages/technical-support/answer-center/edit.vue | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/wangE.vue b/src/components/wangE.vue index a20bcd7..c63198e 100644 --- a/src/components/wangE.vue +++ b/src/components/wangE.vue @@ -105,6 +105,10 @@ export default { this.info_ = html; // 绑定当前逐渐地值 this.$emit("change", this.info_); // 将内容同步到父组件中 }; + this.editor.config.onchange = html => { + this.info_ = html; // 绑定当前逐渐地值 + this.$emit("change", this.info_); // 将内容同步到父组件中 + }; // 创建富文本编辑器 this.editor.create(); } diff --git a/src/components/wangEBd.vue b/src/components/wangEBd.vue index d8a0d9d..437efce 100644 --- a/src/components/wangEBd.vue +++ b/src/components/wangEBd.vue @@ -81,7 +81,7 @@ export default { this.editor.config.uploadImgMaxLength = 6; // 限制一次最多上传 3 张图片 this.editor.config.uploadImgTimeout = 3 * 60 * 1000; // 设置超时时间 this.editor.config.uploadImgParams = { directory: "image" }; - + console.log(this.editor); this.editor.config.uploadImgHooks = { fail: (xhr, editor, result) => { // 插入图片失败回调 @@ -117,6 +117,10 @@ export default { this.info_ = html; // 绑定当前逐渐地值 this.$emit("change", this.info_); // 将内容同步到父组件中 }; + this.editor.config.onchange = html => { + this.info_ = html; // 绑定当前逐渐地值 + this.$emit("change", this.info_); // 将内容同步到父组件中 + }; // 创建富文本编辑器 this.editor.create(); } diff --git a/src/pages/technical-support/answer-center/detail.vue b/src/pages/technical-support/answer-center/detail.vue index 65bc2c7..6a63bc3 100644 --- a/src/pages/technical-support/answer-center/detail.vue +++ b/src/pages/technical-support/answer-center/detail.vue @@ -518,7 +518,7 @@ export default { padding: 16px; } .ans_self{ - width: 100%; + width: 856px; padding: 24px; height: 354px; background-color: #ffffff; diff --git a/src/pages/technical-support/answer-center/edit.vue b/src/pages/technical-support/answer-center/edit.vue index a21bc99..16e3c23 100644 --- a/src/pages/technical-support/answer-center/edit.vue +++ b/src/pages/technical-support/answer-center/edit.vue @@ -104,7 +104,7 @@ export default { color: #242c43; } .detail_content { - width: 100%; + width: 1200px; } .detail_title{ -- 2.26.0