chore(plugin): 清掉便利贴的面板专用样式;补 side 字段文档
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 39s
Verify (Gitea) / gate (build · unit · facts) (push) Failing after 39s
便利贴面板移除后,ensureStyle 里 9 条只服务面板的 CSS(iwb-sticky-panel* / iwb-sticky-add* / iwb-sticky-list / iwb-sticky-row* / iwb-sticky-go*)成为死代码,一并删除; 节点本身的样式(iwb-sticky-node*)保持不变。index.json 的 SRI 同步更新。 文档:docs/standards/plugin-development.md 的面板章节补 icon / side 字段, 并写明「side 只决定首次回填、用户摆放优先」「纯节点插件不必注册面板」。 验证:npm run verify:ci 全绿(含 e2e 冒烟 31 条 / 45s)。
This commit is contained in:
1 parent
c313a11f3e
commit
e02c3b66e9
3 files changed
+7
-11
No files matched your search
@@ -63,10 +63,15 @@ package.json:
|
||||
ctx.ui.registerPanel({
|
||||
id: 'my-panel',
|
||||
title: '我的插件',
|
||||
icon: 'star', // 可选:停靠栏图标(缺省 puzzle)
|
||||
side: 'left', // 可选:默认落哪一侧(left | right,缺省 right)
|
||||
mount (host) { /* 渲染到 host */ },
|
||||
unmount (host) { /* 清理定时器/监听 */ }
|
||||
})
|
||||
|
||||
- 面板进左右停靠栏,面板 key 为 plugin:<插件id>:<面板id>。
|
||||
- side 只决定**首次**回填到哪一侧;用户拖到另一侧后以用户摆放为准,用户移除过的不会自动加回。
|
||||
- 只有节点能力的插件不必注册面板(例:便利贴只是画布节点)。
|
||||
- mount 只调用一次,内部自己管理重渲染。
|
||||
- 面板宽度可变:使用栅格/瀑布流,不要写死 px 宽度。
|
||||
- 面板内所有 DOM 事件在 unmount 时移除。
|
||||
|
||||
Reference in new issue
Block a user