微信小程序开发一swiper轮播图的简单实现
来源:互联网 发布:网络延时英文 编辑:程序博客网 时间:2024/06/06 01:22
swiper是温馨小程序里面提供实现轮播图效果的一个的很好的组件,使用非常简单。
下面直接看我的代码
data: {
imgUrls: [
'http://img4.imgtn.bdimg.com/it/u=853537835,3029652797&fm=23&gp=0.jpg',
'http://img0.imgtn.bdimg.com/it/u=1582567067,766279201&fm=23&gp=0.jpg',
'http://img4.imgtn.bdimg.com/it/u=1489243952,524930210&fm=23&gp=0.jpg',
],
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 1000
},
changeIndicatorDots: function (e) {
this.setData({
indicatorDots: !this.data.indicatorDots
})
},
changeAutoplay: function (e) {
this.setData({
autoplay: !this.data.autoplay
})
},
intervalChange: function (e) {
this.setData({
interval: e.detail.value
})
},
durationChange: function (e) {
this.setData({
duration: e.detail.value
})
},
下面是实现的效果图:
具体参数可以到官方的Demo:
https://mp.weixin.qq.com/debug/wxadoc/dev/component/swiper.html
- 微信小程序开发一swiper轮播图的简单实现
- 学习笔记_微信小程序开发--组建Swiper的使用
- 微信小程序swiper实现轮播图,可触发点击事件
- 微信小程序之swiper轮播图
- 微信小程序之swiper轮播图
- 微信小程序--使用swiper实现滚动广告
- 微信小程序的视图容器—swiper
- 微信小程序 轮播图 swiper图片组件
- 微信小程序(轮播图 swiper组件)
- 微信小程序 swiper 应用
- (四)微信小程序之实现轮番效果(swiper)
- 微信小程序swiper组件实现图片宽度自适应
- 微信小程序swiper组件实现图片宽度自适应
- 微信小程序使用swiper实现侧滑功能
- Swiper的简单实用方法
- swiper的使用(一)
- swiper的使用(一)
- 微信小程序入门之swiper
- css
- Cocos2d-x键盘按键
- php中POST和GET的微妙差别
- Android学习路线指南
- pandas.Series函数用法
- 微信小程序开发一swiper轮播图的简单实现
- 有刷直流电机H桥功率驱动电路的设计心得
- SQL Server 全文索引的硬伤
- android面试题-Service中弹出Dialog
- Linuxf服务器动态生成Android带标识的自定义APP打包
- 微信小程序tabBar 不显示底部菜单的原因和解决方法
- linux 新建用户、用户组 以及为新用户分配权限
- leetcode 第18题 4Sum
- splice/slice/split的区别