feat(plugins): 同步便利贴 sticky v1.0.4(rows=1 去掉预留行高)
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 35s

This commit is contained in:
qiqi committed 2026-11-24 11:45:29 +08:00
1 parent f64898db96
commit 5b5dbbd417
2 files changed
+8 -5

No files matched your search

+3 -3
View File
@@ -64,9 +64,9 @@
},
{
"id": "sticky",
"file": "plugin-sticky.d56d16b30743.js",
"version": "1.0.3",
"integrity": "sha256-1W0WswdDfppndPhoc4ODRKzLLhSq6fc6J3MLNC/o3Lw="
"file": "plugin-sticky.909dcab8168c.js",
"version": "1.0.4",
"integrity": "sha256-kJ3KuBaM5Qs7law9aYJxbEfeYWs3I1F2eMtexuibVOc="
},
{
"id": "style-source",
@@ -151,7 +151,10 @@
var dot = el('button', { className: 'iwb-sticky-dot', type: 'button', title: '背景色', 'data-act': 'palette' })
var pal = el('div', { className: 'iwb-sticky-pal', hidden: true })
var colorInput = el('input', { type: 'color', className: 'iwb-sticky-color-input', 'data-act': 'color' })
var body = el('textarea', { className: 'iwb-sticky-body', spellcheck: 'false', placeholder: '双击编辑…' })
// rows=1 是关键:textarea 默认 rows=2,fitBody() 把高度设 auto 读 scrollHeight 时,
// 单行文字也会被算成两行高(用户报的“预留了一行文本高度”)。显式 1 行后,
// scrollHeight 才等于真实内容行数——多行文本仍会自动换行、高度跟着涨。
var body = el('textarea', { className: 'iwb-sticky-body', rows: '1', spellcheck: 'false', placeholder: '双击编辑…' })
// 对齐宿主文本节点:默认只读。宿主 CSS `.iwb-node textarea[readonly]{pointer-events:none}`
// ⇒ 单击穿透给节点卡片(选中/拖动);双击由本插件在 root 上接管进入编辑。
body.readOnly = true
@@ -413,7 +416,7 @@
global.IWBPluginHost.register({
id: 'sticky',
name: '便利贴',
version: '1.0.3',
version: '1.0.4',
apiVersion: 1,
capabilities: ['panels', 'nodeTypes', 'canvas'],
}, function (ctx) {