feat: 状态胶囊升级——顶栏紧凑状态条 + 点击展开宿主渲染详情弹层(StatusItem.icon/detail:分组/行/徽标/行内深链)

This commit is contained in:
Rick Ye
2026-09-11 11:02:44 +08:00
parent 1edaf17623
commit 7103675db8
5 changed files with 202 additions and 22 deletions
+16
View File
@@ -34,6 +34,22 @@ export default definePlugin((api) => {
}
})
// ---- 状态胶囊示范:顶栏紧凑状态条,点击展开详情弹层(数据驱动,宿主统一渲染) ----
api.ui.setStatusItem('summary', {
text: '示例 1/2',
tone: 'accent',
detail: {
sections: [
{
rows: [
{ label: '示例任务', detail: '把这段换成真正的状态数据', trailing: '进行中', tone: 'accent' },
{ label: '打开面板', openView: { view: api.manifest.id } }
]
}
]
}
})
// ---- 面板/视图组件在 renderer.mjs(JSX 构建见 README);无 UI 需求可整段去掉 ----
log.info('ready', { hasRenderer: true })