Interface: ContentDef<T>
Defined in: registry.tsx:47
Type Parameters
T
T extends object = Record<string, unknown>
Properties
Comp
Comp: (
p) =>ReactNode
Defined in: registry.tsx:55
渲染组件:收到的 state/setState 即该 (areaId, type) 槽位的实例状态
Parameters
p
ContentProps<T>
Returns
ReactNode
defaults?
optionaldefaults?:T
Defined in: registry.tsx:53
每个该类型区域首次渲染时注入的实例状态默认值(同时决定 T)
onMount?
optionalonMount?: (ctx) =>void
Defined in: registry.tsx:57
面板挂载后调用(defaults 已注入)。同区域的 (areaId, type) 实例每次挂载触发一次
Parameters
ctx
Returns
void
onUnmount?
optionalonUnmount?: (ctx) =>void
Defined in: registry.tsx:60
面板卸载前调用,与 onMount 成对(切换类型/区域被吞并/restore 重建/类型被注销 unregisterContent)。 时序保证:同区域切换类型时,旧类型 onUnmount 先于新类型 onMount。
Parameters
ctx
Returns
void
title?
optionaltitle?:string
Defined in: registry.tsx:51
区域头部标题;未提供时回退 CONTENT 表,再回退 type 原文
type
type:
string
Defined in: registry.tsx:49
内容类型标识,对应 screen.areas[].contentType