diff --git a/src/popover/index.ts b/src/popover/index.ts index 97143a6dc2c..89d9a5d70c3 100644 --- a/src/popover/index.ts +++ b/src/popover/index.ts @@ -1,4 +1,4 @@ export type { PopoverInst, PopoverTrigger } from './src/interface' export { default as NPopover, popoverProps } from './src/Popover' -export type { PopoverProps } from './src/Popover' +export type { PopoverProps, PopoverSlots } from './src/Popover' export type { FollowerPlacement as PopoverPlacement } from 'vueuc' diff --git a/src/popover/src/Popover.tsx b/src/popover/src/Popover.tsx index 62df826a32b..3a08dc5a71b 100644 --- a/src/popover/src/Popover.tsx +++ b/src/popover/src/Popover.tsx @@ -23,6 +23,7 @@ import { provide, type Ref, ref, + type SlotsType, Text, toRef, type VNode, @@ -222,10 +223,19 @@ export const popoverProps = { export type PopoverProps = ExtractPublicPropTypes export type PopoverInternalProps = ExtractInternalPropTypes +export interface PopoverSlots { + trigger?: any + footer?: any + header?: any + default?: any + [key: string]: any +} + export default defineComponent({ name: 'Popover', inheritAttrs: false, props: popoverProps, + slots: Object as SlotsType, __popover__: true, setup(props) { if (__DEV__) {