[PR #486] fix(#444)分屏预览情况在,本地图片粘贴后,无法立即加载的问题. #737

Open
opened 2026-03-02 03:41:32 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/codexu/note-gen/pull/486
Author: @WuxuFanhua
Created: 7/29/2025
Status: 🔄 Open

Base: devHead: fix_444


📝 Commits (1)

  • 7727c61 fix(#444)分屏预览情况在,本地图片粘贴后,无法立即加载的问题.

📊 Changes

1 file changed (+5 additions, -2 deletions)

View changed files

📝 src/app/core/article/md-editor.tsx (+5 -2)

📄 Description

增加分屏下,右侧预览的处理.vditor.vditor.preview?.element
看源码发现,分屏处理完成后,会有个1000ms延迟.会导致,重新请求图片,会报404错误,无法显示.
修改为,1100ms后,重新处理本地图片. (可以增加分屏模式判断,再执行这个.)
vditor index.js 12275行.
else {
var html = vditor.lute.Md2HTML(markdownText);
if (vditor.options.preview.transform) {
html = vditor.options.preview.transform(html);
}
_this.previewElement.innerHTML = html;
_this.afterRender(vditor, renderStartTime);
}
}, vditor.options.preview.delay);


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/codexu/note-gen/pull/486 **Author:** [@WuxuFanhua](https://github.com/WuxuFanhua) **Created:** 7/29/2025 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix_444` --- ### 📝 Commits (1) - [`7727c61`](https://github.com/codexu/note-gen/commit/7727c616a4665da237e708a9ff05886da84e1f35) fix(#444)分屏预览情况在,本地图片粘贴后,无法立即加载的问题. ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/app/core/article/md-editor.tsx` (+5 -2) </details> ### 📄 Description 增加分屏下,右侧预览的处理.vditor.vditor.preview?.element 看源码发现,分屏处理完成后,会有个1000ms延迟.会导致,重新请求图片,会报404错误,无法显示. 修改为,1100ms后,重新处理本地图片. (可以增加分屏模式判断,再执行这个.) vditor index.js 12275行. else { var html = vditor.lute.Md2HTML(markdownText); if (vditor.options.preview.transform) { html = vditor.options.preview.transform(html); } _this.previewElement.innerHTML = html; _this.afterRender(vditor, renderStartTime); } }, vditor.options.preview.delay); --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/note-gen#737
No description provided.