Skip to content

类型

包导出的主要类型:

类型说明
LayerConfigCreatecreateLayer 第二参(Raw flat;无顶层 component
LayerConfigContainerdefineLayer 配置(顶层 = container)
LayerConfigUseuseLayer 第二参(无顶层 componentcontainer.component 仍可写)
LayerConfigContentopen / confirm / clone(顶层 = content,可含 component
PropsOf从组件定义抽出 props(Vue 2.7 / 3 本地 shim;去掉 class/style/key 等内建键)
LayerPropsInputPartial<P> 保留精确类型 + 字符串索引允许未抽出的键(Vue 2 onXxx / 自定义 props)
LayerConfigFragmentCanonical 双侧分栏(写 adapter 时用)
LayerAdapter(fragment) => fragment
LayerDefinedefineLayer 返回值(含 exists
LayerInstance实例接口(可选 ContentP / ContainerP 泛型)
CloseOnRaw用户侧 closeOn 配置(数组糖 / Record)
LayerConfirmResult / LayerConfirmSourceconfirm()
LayerCloseOptionsclose(options?)

createLayer(Container)useX(Content) 会推导 props,接到 $open / open.props / container.props。slots 名与 closeOn↔emits 本版不收窄。见 ADR 0012

推不出 props 时回落 Record<string, unknown>;逃逸可 as LayerInstance<MyProps, ContainerProps>PropsOf<typeof Comp>Simplify / LooseProps / LayerConfig*Of 为内部实现,不从包导出。

Canonical / Bound 等管线类型(CloseOnLayerBound 等)为内部实现,不从包导出。配置三域见 配置域命名

MIT Licensed