Browse Source

fix 修复 富文本编辑器 添加之后内容未清理问题

疯狂的狮子Li 4 months ago
parent
commit
3f08ae6ac4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/components/Editor/index.vue

+ 1 - 1
src/components/Editor/index.vue

@@ -110,7 +110,7 @@ watch(
   () => props.modelValue,
   () => props.modelValue,
   (v: string) => {
   (v: string) => {
     if (v !== content.value) {
     if (v !== content.value) {
-      content.value = v === undefined ? '<p></p>' : v;
+      content.value = v || '<p></p>';
     }
     }
   },
   },
   { immediate: true }
   { immediate: true }