Skip to content

Commit

Permalink
feat(mention): 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 8b0c79d commit bad51fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mention/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type { MentionInst, MentionOption } from './src/interface'
export { mentionProps, default as NMention } from './src/Mention'
export type { MentionProps } from './src/Mention'
export type { MentionProps, MentionSlots } from './src/Mention'
7 changes: 7 additions & 0 deletions src/mention/src/Mention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
nextTick,
type PropType,
ref,
type SlotsType,
toRef,
Transition
} from 'vue'
Expand Down Expand Up @@ -131,9 +132,15 @@ export const mentionProps = {

export type MentionProps = ExtractPublicPropTypes<typeof mentionProps>

export interface MentionSlots {
default?: any
empty?: any
}

export default defineComponent({
name: 'Mention',
props: mentionProps,
slots: Object as SlotsType<MentionSlots>,
setup(props) {
const {
namespaceRef,
Expand Down

0 comments on commit bad51fd

Please sign in to comment.