From 5b5dbbd4170f58bddf7d34c794731e46541b7082 Mon Sep 17 00:00:00 2001 From: qiqi Date: Tue, 24 Nov 2026 11:45:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugins):=20=E5=90=8C=E6=AD=A5=E4=BE=BF?= =?UTF-8?q?=E5=88=A9=E8=B4=B4=20sticky=20v1.0.4=EF=BC=88rows=3D1=20?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A2=84=E7=95=99=E8=A1=8C=E9=AB=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/index.json | 6 +++--- ...ticky.d56d16b30743.js => plugin-sticky.909dcab8168c.js} | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) rename plugins/runtime/{plugin-sticky.d56d16b30743.js => plugin-sticky.909dcab8168c.js} (97%) diff --git a/plugins/index.json b/plugins/index.json index c07f437..44f23cc 100644 --- a/plugins/index.json +++ b/plugins/index.json @@ -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", diff --git a/plugins/runtime/plugin-sticky.d56d16b30743.js b/plugins/runtime/plugin-sticky.909dcab8168c.js similarity index 97% rename from plugins/runtime/plugin-sticky.d56d16b30743.js rename to plugins/runtime/plugin-sticky.909dcab8168c.js index 5d2fc83..ed01fa0 100644 --- a/plugins/runtime/plugin-sticky.d56d16b30743.js +++ b/plugins/runtime/plugin-sticky.909dcab8168c.js @@ -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) {