From c47835e2eef03a169f58b9471e5901c9689cf5e3 Mon Sep 17 00:00:00 2001 From: yuantao Date: Fri, 17 Oct 2025 13:05:28 +0800 Subject: [PATCH] =?UTF-8?q?"=E4=BF=AE=E5=A4=8D=EF=BC=9A=E4=BE=BF=E7=AD=BE?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=B8=BA=E7=A9=BA=E6=A3=80=E6=9F=A5=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=94=AF=E6=8C=81=E7=BA=AF=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E4=BE=BF=E7=AD=BE"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/NoteEditorPage.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pages/NoteEditorPage.vue b/src/pages/NoteEditorPage.vue index 969cfc7..263c94a 100644 --- a/src/pages/NoteEditorPage.vue +++ b/src/pages/NoteEditorPage.vue @@ -214,6 +214,10 @@ const handleSave = async () => { const isContentEmpty = content => { if (!content) return true + // 检查是否包含图片元素 + const hasImages = /]*>|]*class="[^"]*editor-image[^"]*"[^>]*>/.test(content) + if (hasImages) return false + // 移除HTML标签和空白字符后检查是否为空 const plainText = content.replace(/<[^>]*>/g, '').trim() if (plainText === '') return true