liujq 4 gadi atpakaļ
vecāks
revīzija
fe70a2dbf7

+ 2 - 2
src/components/Tinymce/index.vue

@@ -81,8 +81,8 @@ export default {
   },
   watch: {
     value(val) {
-      // if (!this.hasChange && this.hasInit) {
-      if (this.hasInit) {
+      // if (this.hasInit) {
+      if (!this.hasChange && this.hasInit) {
         this.$nextTick(() =>
           window.tinymce.get(this.tinymceId).setContent(val))
       }

+ 2 - 0
src/views/news/components/popup/IndexEditSelf.vue

@@ -130,11 +130,13 @@ export default {
             this.$api.house[apiStr](newForm).then(data => {
               this.$msgs(newForm.id ? '编辑成功' : '新增成功')
               this.$emit('close', newForm)
+              this.$refs.refContent.hasChange = false
             })
           }
         })
       } else {
         this.$emit('close')
+        this.$refs.refContent.hasChange = false
         this.setDefaultValue()
       }
     }