diff --git a/src/tree-select/index.ts b/src/tree-select/index.ts index 67db9c2247e..0c451b087f5 100644 --- a/src/tree-select/index.ts +++ b/src/tree-select/index.ts @@ -12,4 +12,4 @@ export type { TreeSelectRenderTag } from './src/interface' export { default as NTreeSelect, treeSelectProps } from './src/TreeSelect' -export type { TreeSelectProps } from './src/TreeSelect' +export type { TreeSelectProps, TreeSelectSlots } from './src/TreeSelect' diff --git a/src/tree-select/src/TreeSelect.tsx b/src/tree-select/src/TreeSelect.tsx index 533be8c89e5..17c2bb129ea 100644 --- a/src/tree-select/src/TreeSelect.tsx +++ b/src/tree-select/src/TreeSelect.tsx @@ -36,6 +36,7 @@ import { type PropType, provide, ref, + type SlotsType, toRef, Transition, type VNodeChild, @@ -181,9 +182,17 @@ export const treeSelectProps = { export type TreeSelectProps = ExtractPublicPropTypes +export interface TreeSelectSlots { + header?: any + action?: any + arrow?: any + empty?: any +} + export default defineComponent({ name: 'TreeSelect', props: treeSelectProps, + slots: Object as SlotsType, setup(props) { if (__DEV__) { watchEffect(() => {