diff --git a/src/cascader/index.ts b/src/cascader/index.ts index a849023bb9b..b2586a11eba 100644 --- a/src/cascader/index.ts +++ b/src/cascader/index.ts @@ -1,3 +1,3 @@ export { cascaderProps, default as NCascader } from './src/Cascader' -export type { CascaderProps } from './src/Cascader' +export type { CascaderProps, CascaderSlots } from './src/Cascader' export type { CascaderInst, CascaderOption } from './src/interface' diff --git a/src/cascader/src/Cascader.tsx b/src/cascader/src/Cascader.tsx index f027dde292b..b4138a989fc 100644 --- a/src/cascader/src/Cascader.tsx +++ b/src/cascader/src/Cascader.tsx @@ -36,6 +36,7 @@ import { type PropType, provide, ref, + type SlotsType, toRef, type VNode, type VNodeChild, @@ -193,9 +194,17 @@ export const cascaderProps = { export type CascaderProps = ExtractPublicPropTypes +export interface CascaderSlots { + action?: any + arrow?: any + empty?: any + 'not-found'?: any +} + export default defineComponent({ name: 'Cascader', props: cascaderProps, + slots: Object as SlotsType, setup(props, { slots }) { if (__DEV__) { watchEffect(() => {