fix(out): 有远程 url 时不做骨架遮挡(回到渐进渲染);落地超时改 5 分钟安全阀

This commit is contained in:
qiqi committed 2026-12-02 22:08:49 +08:00
1 parent ee09343011
commit 4e8f3215a5
3 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -896,7 +896,9 @@
// 避免大图区域纯空白(有缩略图时 LOD 已经会显示模糊可辨的画面,不需要这层)。
// 2026-12-02 修 TDZ:_localSrc 必须先声明再用(上一版 phEl 读它时还没初始化,五态全崩)
const _localSrc = (r && r.idb && r.data) ? r.data : ((r && r.url && outThumbCache.get(r.url)) || null)
const phEl = (!_localSrc && !(ingSt && ingSt.localUrl) && /^https?:/i.test(String((r && r.url) || '')))
// 2026-12-02:骨架只在「连远程 url 都没有」时出现。有 url 就让 <img> 直接渐进渲染(203 的观感),
// 不要用骨架盖住一张正在下载的图 —— 慢 CDN 上那会变成长时间空白。
const phEl = (!_localSrc && !(ingSt && ingSt.localUrl) && !String((r && r.url) || ''))
? el('div', { className: 'iwb-out-cell-ph', key: 'ph' }, el('span', { className: 'iwb-out-cell-ph-txt' }, '下载中…'))
: null
const imgEl = el('img', { key: 'out-img-' + cur + '-' + String(r.url || '').slice(-48), className: 'iwb-out-cell-img', decoding: 'async', fetchPriority: 'low', referrerPolicy: 'no-referrer', onLoad: (e) => {