Skip to content

Commit

Permalink
feat(tree-select): export slots type (tusen-ai#6599)
Browse files Browse the repository at this point in the history
  • Loading branch information
nailiable committed Dec 7, 2024
1 parent 45366cb commit b9f0b9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree-select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
9 changes: 9 additions & 0 deletions src/tree-select/src/TreeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
type PropType,
provide,
ref,
type SlotsType,
toRef,
Transition,
type VNodeChild,
Expand Down Expand Up @@ -181,9 +182,17 @@ export const treeSelectProps = {

export type TreeSelectProps = ExtractPublicPropTypes<typeof treeSelectProps>

export interface TreeSelectSlots {
header?: any
action?: any
arrow?: any
empty?: any
}

export default defineComponent({
name: 'TreeSelect',
props: treeSelectProps,
slots: Object as SlotsType<TreeSelectSlots>,
setup(props) {
if (__DEV__) {
watchEffect(() => {
Expand Down

0 comments on commit b9f0b9f

Please sign in to comment.