slide.ts 512 B

123456789101112131415161718192021
  1. import { buildProps, definePropType } from '@kankan-components/utils'
  2. import type { ExtractPropTypes } from 'vue'
  3. import type Slide from './slide.vue'
  4. export const slideProps = buildProps({
  5. items: {
  6. type: definePropType<any[]>(Array),
  7. default: [],
  8. },
  9. currentIndex: {
  10. type: Number,
  11. default: 0,
  12. },
  13. showCtrl: {
  14. type: Boolean,
  15. },
  16. })
  17. export type SlideProps = ExtractPropTypes<typeof slideProps>
  18. export type SlideInstance = InstanceType<typeof Slide>