Skip to content

Commit

Permalink
feat(spin): 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 040600b commit 6e06edf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/spin/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default as NSpin, spinProps } from './src/Spin'
export type { SpinProps } from './src/Spin'
export type { SpinProps, SpinSlots } from './src/Spin'
8 changes: 8 additions & 0 deletions src/spin/src/Spin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
h,
type PropType,
ref,
type SlotsType,
Transition,
watchEffect
} from 'vue'
Expand Down Expand Up @@ -55,9 +56,16 @@ export const spinProps = {

export type SpinProps = ExtractPublicPropTypes<typeof spinProps>

export interface SpinSlots {
default?: any
description?: any
icon?: any
}

export default defineComponent({
name: 'Spin',
props: spinProps,
slots: Object as SlotsType<SpinSlots>,
setup(props) {
if (__DEV__) {
watchEffect(() => {
Expand Down

0 comments on commit 6e06edf

Please sign in to comment.