微信小程序的轮播图形通常由滑动器组件创建,在文档中是指幻灯片视图容器
属性如下:
eq:
wxml:
siperindicator-dots=' { indicator dots } } ' autoplay=' { autoplay } } ' interval=' { interval } ' duration=' swipeper
swiper { height: 400rpx; width: 100%; }swiper-item { height: 100%; width: 100%; }.slide-image{ height: 100%; width: 100%; } wxjs:
data: { current: 0,//当前页面的索引指示符dots : true, //面板指示点是否显示autoplay: true、//interval33603000是否自动切换、//自动切换时间间隔duration: 800、//幻灯片视频时间circular 33660 //是否采用合并幻灯片imgurls : [ ' http://1027145.user-website5.com/yizhan/' http://1027145.user-website5.com/yizzhan ' 33581027145.user-website5.com/yizhher links : [ '/pages/second/register ','/pages/second/register ] //轮播图切换事件swiperchange:function(e ) this.setdata ) swipercurrent 3360 e.detail.current ) }, //单击指示点以切换chuangevent:function(e ) this.setdata ) (swipercurrent 3360 e.current target.id ) },然后单击//图像
转载于:https://www.cn blogs.com/nature-wind8/p/10647756.html