From 515a265a809d0c12fb5cbff39cb743f391938a41 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期四, 30 十一月 2023 08:49:34 +0800 Subject: [PATCH] 新增 --- src/components/Editor/index.vue | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 0a696f2..bb8b869 100644 --- a/src/components/Editor/index.vue +++ b/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 }); -- Gitblit v1.9.2