2017-10-17 16:36:12 +08:00
|
|
|
import { ElementUIComponent } from './component'
|
|
|
|
|
|
|
|
export type CarouselIndicatorTrigger = 'hover' | 'click'
|
|
|
|
export type CarouselIndicatorPosition = 'outside' | 'none'
|
2017-10-18 18:31:03 +08:00
|
|
|
export type CarouselArrowVisibility = 'always' | 'hover' | 'never'
|
2017-10-17 16:36:12 +08:00
|
|
|
export type CarouselType = 'card'
|
|
|
|
|
|
|
|
/** Loop a series of images or texts in a limited space */
|
|
|
|
export declare class ElCarousel extends ElementUIComponent {
|
|
|
|
/** Height of the carousel */
|
|
|
|
height: number
|
|
|
|
|
|
|
|
/** Index of the initially active slide (starting from 0) */
|
|
|
|
initialIndex: number
|
|
|
|
|
|
|
|
/** How indicators are triggered */
|
|
|
|
trigger: CarouselIndicatorTrigger
|
|
|
|
|
|
|
|
/** Whether automatically loop the slides */
|
|
|
|
autoplay: boolean
|
|
|
|
|
|
|
|
/** Interval of the auto loop, in milliseconds */
|
|
|
|
interval: number
|
|
|
|
|
|
|
|
/** Position of the indicators */
|
|
|
|
indicatorPosition: CarouselIndicatorPosition
|
|
|
|
|
|
|
|
/** When arrows are shown */
|
2017-10-18 18:31:03 +08:00
|
|
|
arrow: CarouselArrowVisibility
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Type of the Carousel */
|
|
|
|
type: CarouselType
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Manually switch slide by index
|
|
|
|
*
|
|
|
|
* @param index Index of the slide to be switched to (starting from 0)
|
|
|
|
*/
|
2017-10-26 23:15:47 +08:00
|
|
|
setActiveItem (index: number): void
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Manually switch slide by carousel item's name
|
|
|
|
*
|
|
|
|
* @param name The name of the corresponding `el-carousel-item`
|
|
|
|
*/
|
2017-10-26 23:15:47 +08:00
|
|
|
setActiveItem (name: string): void
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Switch to the previous slide */
|
2017-10-26 23:15:47 +08:00
|
|
|
prev (): void
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Switch to the next slide */
|
2017-10-26 23:15:47 +08:00
|
|
|
next (): void
|
2017-10-17 16:36:12 +08:00
|
|
|
}
|