From a64ff8a2a843228a9c85fcd096b3f2915193856f Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Thu, 30 Nov 2023 08:57:58 +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