release: v3.26.80 插件节点图标解析 + 底栏入口范围

This commit is contained in:
qiqi committed 2026-11-25 21:28:28 +08:00
1 parent 5e1c3afed8
commit da7ba1bfd1
9 files changed
+24 -11

No files matched your search

+2 -2
View File
@@ -118,7 +118,7 @@ function PluginAddButton(props) {
document.addEventListener('keydown', onKey)
return () => { document.removeEventListener('pointerdown', onDoc, true); document.removeEventListener('keydown', onKey) }
}, [open])
const list = Array.isArray(props.variants) ? props.variants : []
const list = (Array.isArray(props.variants) ? props.variants : []).filter((pv) => pv && pv.toolbar !== 'hide')
return el('span', { className: 'iwb-plugin-add-wrap', ref: boxRef },
el('button', {
className: 'iwb-btn iwb-plugin-add' + (open ? ' iwb-btn-on' : ''),
@@ -135,7 +135,7 @@ function PluginAddButton(props) {
className: 'iwb-ctx-item',
role: 'menuitem',
onClick: () => { setOpen(false); if (typeof props.onPick === 'function') props.onPick(pv.id) },
}, I('puzzle'), el('span', { className: 'iwb-btn-text' }, pv.title || pv.id))),
}, I(pv.icon || 'puzzle'), el('span', { className: 'iwb-btn-text' }, pv.title || pv.id))),
) : null,
)
}