更新记录
1.0.2(2024-05-25)
下载此版本
新增预览截图
1.0.1(2024-05-25)
下载此版本
新增演示代码
1.0.0(2024-05-25)
下载此版本
组件初始化
查看更多
平台兼容性
App |
快应用 |
微信小程序 |
支付宝小程序 |
百度小程序 |
字节小程序 |
QQ小程序 |
HBuilderX 3.1.0 |
√ |
√ |
√ |
√ |
√ |
√ |
钉钉小程序 |
快手小程序 |
飞书小程序 |
京东小程序 |
√ |
√ |
√ |
√ |
H5-Safari |
Android Browser |
微信浏览器(Android) |
QQ浏览器(Android) |
Chrome |
IE |
Edge |
Firefox |
PC-Safari |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
√ |
dxf-swiper-indicator-long
演示代码
<template>
<view class="index">
<view style="height:30rpx"></view>
<dxf-swiper-indicator-long :arr="banners" :current="current" :aStyles="aStyles" :cStyles="cStyles">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
:duration="duration" @change="change">
<swiper-item v-for="banner in banners">
<view class="swiper-item">
<image class="swiper-img" :src="banner.img" mode=""></image>
</view>
</swiper-item>
</swiper>
</dxf-swiper-indicator-long>
<view style="height:30rpx"></view>
</view>
</template>
<script>
export default {
data() {
return {
current: 0,
aStyles: {
color: 'red'
},
cStyles: {
color: 'yellow'
},
banners: [{
"img": "/static/banner/1.png",
"link": ""
},
{
"img": "/static/banner/2.jpg",
"link": ""
},
{
"img": "/static/banner/3.jpeg",
"link": ""
},
{
"img": "/static/banner/4.jpg",
"link": ""
}
],
indicatorDots: false,
autoplay: false,
interval: 2000,
duration: 500
}
},
methods: {
change(event) {
this.current = event.detail.current
}
}
}
</script>
<style scoped lang="scss">
.index {
width: 700rpx;
margin: auto;
}
.swiper {
width: 700rpx;
border-radius: 30rpx;
overflow: hidden;
}
.swiper-img {
width: 700rpx;
height: 300rpx;
display: block;
}
</style>