diff --git a/src/select/index.ts b/src/select/index.ts index 93ef34d0dad..b038526ddac 100644 --- a/src/select/index.ts +++ b/src/select/index.ts @@ -11,4 +11,4 @@ export type { SelectOption } from './src/interface' export { default as NSelect, selectProps } from './src/Select' -export type { SelectProps } from './src/Select' +export type { SelectProps, SelectSlots } from './src/Select' diff --git a/src/select/src/Select.tsx b/src/select/src/Select.tsx index 4e2b80f5542..5ee1c6799d4 100644 --- a/src/select/src/Select.tsx +++ b/src/select/src/Select.tsx @@ -36,6 +36,7 @@ import { type InputHTMLAttributes, type PropType, ref, + type SlotsType, toRef, Transition, vShow, @@ -217,9 +218,18 @@ export const selectProps = { export type SelectProps = ExtractPublicPropTypes +export interface SelectSlots { + default?: any + header?: any + action?: any + empty?: any + arrow?: any +} + export default defineComponent({ name: 'Select', props: selectProps, + slots: Object as SlotsType, setup(props) { if (__DEV__) { watchEffect(() => {