1 | import { ElementUIComponent } from './component'
|
2 |
|
3 | export type CarouselIndicatorTrigger = 'hover' | 'click'
|
4 | export type CarouselIndicatorPosition = 'outside' | 'none'
|
5 | export type CarouselArrowVisibility = 'always' | 'hover' | 'never'
|
6 | export type CarouselType = 'card'
|
7 |
|
8 | /** Loop a series of images or texts in a limited space */
|
9 | export declare class ElCarousel extends ElementUIComponent {
|
10 | /** Height of the carousel */
|
11 | height: number
|
12 |
|
13 | /** Index of the initially active slide (starting from 0) */
|
14 | initialIndex: number
|
15 |
|
16 | /** How indicators are triggered */
|
17 | trigger: CarouselIndicatorTrigger
|
18 |
|
19 | /** Whether automatically loop the slides */
|
20 | autoplay: boolean
|
21 |
|
22 | /** Interval of the auto loop, in milliseconds */
|
23 | interval: number
|
24 |
|
25 | /** Position of the indicators */
|
26 | indicatorPosition: CarouselIndicatorPosition
|
27 |
|
28 | /** When arrows are shown */
|
29 | arrow: CarouselArrowVisibility
|
30 |
|
31 | /** Type of the Carousel */
|
32 | type: CarouselType
|
33 |
|
34 | /**
|
35 | * Manually switch slide by index
|
36 | *
|
37 | * @param index Index of the slide to be switched to (starting from 0)
|
38 | */
|
39 | setActiveItem (index: number): void
|
40 |
|
41 | /**
|
42 | * Manually switch slide by carousel item's name
|
43 | *
|
44 | * @param name The name of the corresponding `el-carousel-item`
|
45 | */
|
46 | setActiveItem (name: string): void
|
47 |
|
48 | /** Switch to the previous slide */
|
49 | prev (): void
|
50 |
|
51 | /** Switch to the next slide */
|
52 | next (): void
|
53 | }
|