Skip to content

Commit

Permalink
feat(split): 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 6e06edf commit 318ec6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/split/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { default as NSplit, splitProps } from './src/Split'
export type { SplitProps } from './src/Split'
export type { SplitProps, SplitSlots } from './src/Split'
export type { SplitOnUpdateSize } from './src/types'
9 changes: 9 additions & 0 deletions src/split/src/Split.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
h,
type PropType,
ref,
type SlotsType,
toRef,
watchEffect
} from 'vue'
Expand Down Expand Up @@ -60,9 +61,17 @@ export const splitProps = {

export type SplitProps = ExtractPublicPropTypes<typeof splitProps>

export interface SplitSlots {
default?: any
1?: any
2?: any
'resize-trigger'?: any
}

export default defineComponent({
name: 'Split',
props: splitProps,
slots: Object as SlotsType<SplitSlots>,
setup(props) {
const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props)
const themeRef = useTheme(
Expand Down

0 comments on commit 318ec6f

Please sign in to comment.