Skip to main content

Carousel

Carousel

Applicable Scenarios

Used for quickly building carousel display effects, and supports configuring functions such as image click redirection and playback interval.

Basic Capabilities Description

Simply configure in the component configuration area to implement carousel display effects. You can also set corresponding redirect pages for each image in the configuration area. Additionally, our advanced settings support in-depth custom configuration of properties such as playback animations and anchor points for the carousel component.

Property Introduction

组件接收的外部传入的属性

属性名
属性标识
类型
说明
轮播图imagesarray

示例:[ { "image": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png", "title": "图片1", "fit": "cover", "tapMode": "tap", "height": "160px", "width": "100%" }, { "image": "https://main.qcloudimg.com/raw/880b5277dc7d8f62fd6b5f964bee3af4.png", "title": "图片2", "fit": "cover", "tapMode": "tap", "height": "160px", "width": "100%" }, { "image": "https://main.qcloudimg.com/raw/af8d7dff73fea17aa099876bc3a811fa.png", "title": "图片3", "fit": "cover", "tapMode": "tap", "height": "160px", "width": "100%" } ]

自动切换时间间隔(毫秒)intervalnumber

配置轮播图滚动的时间间隔,时间单位为ms

示例:5000

纵向轮播verticalboolean

开启后,轮播的滚动方式将会由横向滚动变更为纵向滚动

示例:false

自动切换autoplayboolean

开启后,轮播图将会自动根据配置的时间间隔进行自动滚动,关闭后则轮播图仅支持通过点击锚点的方式进行切换

示例:true

锚点激活色indicatorActiveColorstring

更改锚点选中时的颜色

示例:"rgba(0, 0, 0, 0.9)"

锚点颜色indicatorColorstring

更改锚点普通状态下的颜色

示例:"rgba(200, 200, 200, 0.9)"

滑动动画时长durationnumber

更改轮播图切换时的滑动动画时长

示例:500

当前所在滑块的 indexcurrentnumber

更改轮播图的默认展示位置,0为默认展示第一张轮播图,以此类推

示例:0

衔接滑动circularboolean

更改轮播图切换时动画的滑动方式

示例:true

导航锚点indicatorDotsboolean

开启/关闭轮播图锚点

示例:true

Event Introduction

组件暴露的事件,可以监听组件的事件来触发一些外部的动作

事件名
事件code
事件出参 event.detail
适用情况
说明
切换change兼容三端

-