Files
element-plus/packages/components/carousel/src/carousel.ts
Jed 53bc6517f2 feat(components): [Carousel] Add motion blur functionality (#15603)
* 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>
2024-02-29 14:54:06 +08:00

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