diff --git a/src/popselect/index.ts b/src/popselect/index.ts index 8138e463fbe..cf58783d1f1 100644 --- a/src/popselect/index.ts +++ b/src/popselect/index.ts @@ -1,3 +1,3 @@ export type { PopselectInst } from './src/interface' export { default as NPopselect, popselectProps } from './src/Popselect' -export type { PopselectProps } from './src/Popselect' +export type { PopselectProps, PopselectSlots } from './src/Popselect' diff --git a/src/popselect/src/Popselect.tsx b/src/popselect/src/Popselect.tsx index 208ff3ffb90..1f589d7f050 100644 --- a/src/popselect/src/Popselect.tsx +++ b/src/popselect/src/Popselect.tsx @@ -9,7 +9,8 @@ import { h, type PropType, provide, - ref + ref, + type SlotsType } from 'vue' import { useConfig, useTheme } from '../../_mixins' import { createRefSetter, keep, mergeEventHandlers, omit } from '../../_utils' @@ -36,9 +37,17 @@ export const popselectProps = { export type PopselectSetupProps = ExtractPropTypes export type PopselectProps = ExtractPublicPropTypes +export interface PopselectSlots { + default?: any + header?: any + action?: any + empty?: any +} + export default defineComponent({ name: 'Popselect', props: popselectProps, + slots: Object as SlotsType, inheritAttrs: false, __popover__: true, setup(props) {