src/components/Editor/index.vue
@@ -90,7 +90,7 @@ ["link", "image", "video"] // 链接、图片、视频 ], }, placeholder: "请输入内容", placeholder: props.readOnly ? "" : "请输入内容", readOnly: props.readOnly }); @@ -108,7 +108,7 @@ const content = ref(""); watch(() => props.modelValue, (v) => { if (v !== content.value) { content.value = v === undefined ? "<p></p>" : v; content.value = (v === undefined || v === "") ? "<p></p>" : v; } }, { immediate: true });