liyongli há 1 ano atrás
pai
commit
ab9e2b9e1c
1 ficheiros alterados com 2 adições e 1 exclusões
  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) {