diff --git a/packages/devui-vue/docs/en-US/components/carousel/index.md b/packages/devui-vue/docs/en-US/components/carousel/index.md new file mode 100644 index 0000000000000000000000000000000000000000..8beb2d9237443b8216359e25013a370979885943 --- /dev/null +++ b/packages/devui-vue/docs/en-US/components/carousel/index.md @@ -0,0 +1,192 @@ +# Carousel + +An area of carousel. + +### When To Use + +Used to display images or cards. + +### Basic Usage + +:::demo + +```vue + + + +``` + +::: + +### Indicator&Toggle-Arrow + +If arrowTrigger is set to always, the arrow is permanently displayed. If dotTrigger is set to hover, it will switched when hover to the dots. + +:::demo + +```vue + + + +``` + +::: + +### Automatic-NVOD + +:::demo + +```vue + + + +``` + +::: + +### Custom-Operations + +:::demo + +```vue + + + +``` + +::: + +### API + +#### parameter + +| Parameter | Type | Default | Description | Jump to Demo | +| :----------------: | :-----------: | :--------------------------: | :-----: | :---------------------------------------------- | +| arrowTrigger | `'hover'\|'never'\|'always'` | 'hover' | Optional. Specifying the display mode of the switching arrow | [Indicator & Toggle Arrow](#indicator-toggle-arrow) | +| autoplay | `boolean` | false | Optional. Indicating whether to enable automatic NVOD. | [Automatic NVOD](#automatic-nvod) | +| autoplaySpeed | `number` | 3000 | Optional. Automatic NVOD speed, in ms. This parameter is used together with `autoplay'. | [Automatic NVOD](#automatic-nvod) | +| height | `string` | '100%' | Optional. NVOD container height | [Basic usage](#basic-usage) | +| showDots | `boolean` | true | Optional. Indicating whether to display the panel indicator | [Automatic NVOD](#automatic-nvod) | +| dotPosition | `'top'\|'bottom'` |'bottom' | Optional. Indicator position on the panel | [Indicator & Toggle Arrow](#indicator-toggle-arrow) | +| dotTrigger | `click'\|'hover'` | 'click' | Optional. The indicator triggers the NVOD mode | [Indicator & Toggle Arrow](#indicator-toggle-arrow) | +| activeIndex | `number` | 0 | Optional. Initializes the activation card index, starting from 0. `[(activeIndex)]` bidirectional binding is supported. | [Basic usage](#basic-usage) | + +#### event + +| Event | Type | Description | Jump to Demo | +| :----------------: | :---------------------: | :-----------------------------------------: | ------------------------------------------------- | +| activeIndexChange | `EventEmitter` | Returns the index of the current card when the card is switched. The index starts from 0. | [Basic usage](#basic-usage) | + +#### method + +| Method | Description | Jump to Demo | +| :---------: | :---------------------------------- | :----------------------------- | +| prev() | Switch to the previous card | [Custom Operations](#custom-operations) | +| next() | Switch to the next card | [Custom Operations](#custom-operations) | +| goTo(index) | Switch to the card with a specified index. The index starts from 0. | [Custom Operations](#custom-operations) | \ No newline at end of file