Skip to content

Commit

Permalink
feat(popconfirm): 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 5657140 commit d06255f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/popconfirm/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type { PopconfirmInst } from './src/interface'
export { default as NPopconfirm, popconfirmProps } from './src/Popconfirm'
export type { PopconfirmProps } from './src/Popconfirm'
export type { PopconfirmProps, PopconfirmSlots } from './src/Popconfirm'
11 changes: 10 additions & 1 deletion src/popconfirm/src/Popconfirm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
h,
type PropType,
provide,
ref
ref,
type SlotsType
} from 'vue'
import { useConfig, useTheme } from '../../_mixins'
import { call, keep, omit } from '../../_utils'
Expand Down Expand Up @@ -49,9 +50,17 @@ export type PopconfirmProps = ExtractPublicPropTypes<typeof popconfirmProps>

export type PopconfirmSetupProps = ExtractPropTypes<typeof popconfirmProps>

export interface PopconfirmSlots {
action?: any
default?: any
icon?: any
[key: string]: any
}

export default defineComponent({
name: 'Popconfirm',
props: popconfirmProps,
slots: Object as SlotsType<PopconfirmSlots>,
__popover__: true,
setup(props) {
const { mergedClsPrefixRef } = useConfig()
Expand Down

0 comments on commit d06255f

Please sign in to comment.