liyongli 1 year ago
parent
commit
ab9e2b9e1c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/components/editor.vue

+ 2 - 1
src/components/editor.vue

@@ -34,9 +34,10 @@ export default {
   },
   watch: {
     rawText(val) {
-      this.$refs.editor.innerHTML = val;
+      if(val != this.$refs.editor.innerHTML) this.$refs.editor.innerHTML = val;
     },
   },
+  onmounted() {},
   beforeMount() {},
   methods: {
     input(e) {