mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
* feat(components): [Carousel] Add motion blur functionality docs(components): [Carousel] Add example properties docs(components): [Carousel] Add docs properties * fix(components): [Carousel] change the id name in filter in svg fix(components): [Carousel] button to remove motion blur effect fix(components): [Carousel] svg hides when motion blur is false * update(components): [Carousel] docs/en-US/component/carousel.md Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com> * update(components): [Carousel] docs/examples/carousel/motion-blur.vue Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com> * update(components): [Carousel] docs/examples/carousel/motion-blur.vue Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com> * update(components): [Carousel] packages/components/carousel/src/carousel.ts Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com> * docs(components): [Carousel] add feature version labels --------- Co-authored-by: kooriookami <38392315+kooriookami@users.noreply.github.com>
66 lines
1.2 KiB
TypeScript
66 lines
1.2 KiB
TypeScript
import { buildProps, isNumber } from '@element-plus/utils'
|
|
import type { ExtractPropTypes } from 'vue'
|
|
|
|
export const carouselProps = buildProps({
|
|
initialIndex: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
height: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
trigger: {
|
|
type: String,
|
|
values: ['hover', 'click'],
|
|
default: 'hover',
|
|
},
|
|
autoplay: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
interval: {
|
|
type: Number,
|
|
default: 3000,
|
|
},
|
|
indicatorPosition: {
|
|
type: String,
|
|
values: ['', 'none', 'outside'],
|
|
default: '',
|
|
},
|
|
arrow: {
|
|
type: String,
|
|
values: ['always', 'hover', 'never'],
|
|
default: 'hover',
|
|
},
|
|
type: {
|
|
type: String,
|
|
values: ['', 'card'],
|
|
default: '',
|
|
},
|
|
loop: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
direction: {
|
|
type: String,
|
|
values: ['horizontal', 'vertical'],
|
|
default: 'horizontal',
|
|
},
|
|
pauseOnHover: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
motionBlur: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
} as const)
|
|
|
|
export const carouselEmits = {
|
|
change: (current: number, prev: number) => [current, prev].every(isNumber),
|
|
}
|
|
|
|
export type CarouselProps = ExtractPropTypes<typeof carouselProps>
|
|
export type CarouselEmits = typeof carouselEmits
|