From 7727c616a4665da237e708a9ff05886da84e1f35 Mon Sep 17 00:00:00 2001 From: wuxufanhua <89204585@qq.com> Date: Tue, 29 Jul 2025 12:35:48 +0800 Subject: [PATCH] =?UTF-8?q?fix(#444)=E5=88=86=E5=B1=8F=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=83=85=E5=86=B5=E5=9C=A8,=E6=9C=AC=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E7=B2=98=E8=B4=B4=E5=90=8E,=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E7=AB=8B=E5=8D=B3=E5=8A=A0=E8=BD=BD=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/core/article/md-editor.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/core/article/md-editor.tsx b/src/app/core/article/md-editor.tsx index 18246254..7b6a0ea5 100644 --- a/src/app/core/article/md-editor.tsx +++ b/src/app/core/article/md-editor.tsx @@ -124,7 +124,10 @@ export function MdEditor() { input: (value) => { saveCurrentArticle(value) emitter.emit('editor-input') - handleLocalImage(vditor) + setTimeout(() => { + handleLocalImage(vditor) + }, 1100) + }, mode: localMode, upload: { @@ -193,7 +196,7 @@ export function MdEditor() { // 处理本地相对路径图片 async function handleLocalImage(vditor: Vditor) { const workspace = await getWorkspacePath() - const previews = [vditor.vditor.ir?.element, vditor.vditor.sv?.element, vditor.vditor.wysiwyg?.element] + const previews = [vditor.vditor.ir?.element, vditor.vditor.sv?.element, vditor.vditor.wysiwyg?.element,vditor.vditor.preview?.element] previews.forEach(element => { element?.querySelectorAll('img').forEach(async (img) => { let src = img.getAttribute('src')