chore: v3.26.228(测试版:输出节点下载圆钮)

This commit is contained in:
qiqi committed 2026-12-03 00:40:26 +08:00
1 parent c3bbe1a75a
commit f948a45fcc
9 files changed
+37 -16

No files matched your search

+11 -8
View File
@@ -28,27 +28,30 @@
) : null,
)
}
// 共享「下载浮层」:底部渐变 + 下载(可选复制),hover/focus 才出现。
// 图库插件是原生 DOM,用同一组 token 在插件 CSS 里复刻;宿主这里只需一个 React 组件。
// pointer-events:浮层条本身不吃事件(否则会挡住图片点击/双击),只有悬停后按钮才可点。
// 共享「下载浮层」:右下角圆形图标(可选复制),hover/focus 才出现。
// 2026-12-03(用户裁定):只改输出节点这一处呈现 —— 底部横条会压住矮图的中心,改成只占右下角。
// 约束(上一次改造踩过的坑):① 容器 pointer-events:none、只有按钮 auto;② 不改任何类名之外的 DOM 结构;
// ③ 不动 z-index 层级表、不动 token 体系;旧的 .iwb-dl-bar 样式保留在 CSS 里可随时回退。
function ResultDownloadOverlay (props) {
const p = props || {}
const stopDown = (e) => { try { e.stopPropagation() } catch (err) { /* ignore */ } }
return el('div', { className: 'iwb-dl-ov' },
p.children,
el('div', { className: 'iwb-dl-bar' },
el('div', { className: 'iwb-dl-corner' },
p.onCopyRef ? el('button', {
className: 'iwb-dl-btn iwb-dl-btn-ghost',
className: 'iwb-dl-round',
title: p.copyTitle || '插入为参考图节点',
'aria-label': p.copyLabel || '复制',
onPointerDown: stopDown,
onClick: (e) => { e.stopPropagation(); p.onCopyRef() },
}, p.copyIcon || null, el('span', { className: 'iwb-dl-txt' }, p.copyLabel || '复制')) : null,
}, p.copyIcon || '⧉') : null,
el('button', {
className: 'iwb-dl-btn',
className: 'iwb-dl-round iwb-dl-round-primary',
title: p.downloadTitle || '下载原图',
'aria-label': p.label || '下载',
onPointerDown: stopDown,
onClick: (e) => { e.stopPropagation(); if (p.onDownload) p.onDownload() },
}, p.icon || null, el('span', { className: 'iwb-dl-txt' }, p.label || '下载')),
}, p.icon || '↓'),
),
)
}