Skip to content

wevu / index / defineSlots

函数: defineSlots()

defineSlots<T>(): T

定义于: packages/wevu/src/macros.ts:260

defineSlots 声明 slots 类型。 用于限定插槽名称与插槽参数结构。

类型参数

T

T extends Record<string, any> = Record<string, any>

返回

T

示例

ts
const slots = defineSlots<{
  default?: (props: { text: string }) => any
  footer?: () => any
}>()

Released under the MIT License.