Skip to content

Commit

Permalink
feat(ellipsis): 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 e5fab2c commit fa678e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ellipsis/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { ellipsisProps, default as NEllipsis } from './src/Ellipsis'
export type { EllipsisProps } from './src/Ellipsis'
export type { EllipsisProps, EllipsisSlots } from './src/Ellipsis'
export { NPerformantEllipsis } from './src/PerformantEllipsis'
9 changes: 8 additions & 1 deletion src/ellipsis/src/Ellipsis.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
mergeProps,
onDeactivated,
type PropType,
ref
ref,
type SlotsType
} from 'vue'
import { useTheme } from '../../_mixins'
import { useMergedClsPrefix } from '../../_mixins/use-config'
Expand Down Expand Up @@ -38,10 +39,16 @@ export const ellipsisProps = {

export type EllipsisProps = ExtractPublicPropTypes<typeof ellipsisProps>

export interface EllipsisSlots {
default?: any
tooltip?: any
}

export default defineComponent({
name: 'Ellipsis',
inheritAttrs: false,
props: ellipsisProps,
slots: Object as SlotsType<EllipsisSlots>,
setup(props, { slots, attrs }) {
const mergedClsPrefixRef = useMergedClsPrefix()
const mergedTheme = useTheme(
Expand Down

0 comments on commit fa678e3

Please sign in to comment.