From a2fb54b76f45efe235d54e736d64b1bc080eeffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=A9?= Date: Sun, 29 Apr 2018 21:54:07 +0800 Subject: [PATCH] Fix tinymce component input watch wrong MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tinymce watch input value 不正常 如果传入为空 Tinymce 不会进行刷新 --- src/components/Tinymce/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Tinymce/index.vue b/src/components/Tinymce/index.vue index 97ad2432..c76c206c 100644 --- a/src/components/Tinymce/index.vue +++ b/src/components/Tinymce/index.vue @@ -48,7 +48,8 @@ export default { }, watch: { value(val) { - if (!this.hasChange && this.hasInit) { + if (val == null) {val = ''} + if (this.hasInit) { this.$nextTick(() => window.tinymce.get(this.tinymceId).setContent(val)) } }