diff --git a/src/thing/index.ts b/src/thing/index.ts index f99ef2d69a0..776f864b5d6 100644 --- a/src/thing/index.ts +++ b/src/thing/index.ts @@ -1,2 +1,2 @@ export { default as NThing, thingProps } from './src/Thing' -export type { ThingProps } from './src/Thing' +export type { ThingProps, ThingSlots } from './src/Thing' diff --git a/src/thing/src/Thing.tsx b/src/thing/src/Thing.tsx index a8e81508505..56b076ebee4 100644 --- a/src/thing/src/Thing.tsx +++ b/src/thing/src/Thing.tsx @@ -7,7 +7,8 @@ import { defineComponent, Fragment, h, - type PropType + type PropType, + type SlotsType } from 'vue' import { useConfig, useRtl, useTheme, useThemeClass } from '../../_mixins' import { thingLight } from '../styles' @@ -28,9 +29,20 @@ export const thingProps = { export type ThingProps = ExtractPublicPropTypes +export interface ThingSlots { + action?: any + avatar?: any + default?: any + description?: any + footer?: any + 'header-extra'?: any + header?: any +} + export default defineComponent({ name: 'Thing', props: thingProps, + slots: Object as SlotsType, setup(props, { slots }) { const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props)