mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-20 17:54:01 +00:00

为 [Halo 2.20](https://github.com/halo-dev/halo/releases/tag/v2.20.0) 更新文档。 /kind documentation ```release-note None ```
994 B
994 B
title, description
title | description |
---|---|
用户详情选项卡 | 扩展用户详情选项卡 - user:detail:tabs:create |
此扩展点用于扩展用户详情页面的选项卡。
定义方式
export default definePlugin({
extensionPoints: {
"user:detail:tabs:create": (): UserTab[] | Promise<UserTab[]> => {
return [
{
id: "foo",
label: "foo",
component: markRaw(FooComponent),
priority: 20,
},
];
},
},
});
export interface UserTab {
id: string; // 选项卡 ID
label: string; // 选项卡标题
component: Raw<Component>; // 选项卡面板组件
priority: number; // 排序优先级
}
其中,component
组件有以下实现要求:
- 组件包含以下 props:
user:DetailedUser
:当前用户信息。