Skip to content

Commit

Permalink
feat(popselect): add 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 0db42a8 commit a0223dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/popselect/index.ts
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 10 additions & 1 deletion src/popselect/src/Popselect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -36,9 +37,17 @@ export const popselectProps = {
export type PopselectSetupProps = ExtractPropTypes<typeof popselectProps>
export type PopselectProps = ExtractPublicPropTypes<typeof popselectProps>

export interface PopselectSlots {
default?: any
header?: any
action?: any
empty?: any
}

export default defineComponent({
name: 'Popselect',
props: popselectProps,
slots: Object as SlotsType<PopselectSlots>,
inheritAttrs: false,
__popover__: true,
setup(props) {
Expand Down

0 comments on commit a0223dc

Please sign in to comment.