liyongli 1 年間 前
コミット
ab9e2b9e1c
1 ファイル変更2 行追加1 行削除
  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) {