微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码

微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码
公司 个人 家庭 社会 国家

张伯礼院士:除湖北外,全国其他省市4月底应可恢复正常秩序
个人内容列表

家庭内容列表

社会内容列表

国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表 国家内容列表

index.wxss
微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码
.swiper-tab {/* overflow-x:hidden; / width: 100%; border-bottom: 2rpx solid #ccc; text-align: center; height: 60rpx; line-height: 30rpx; display: flex; flex-flow: row; justify-content: space-between;}
.swiper-tab-item { width: 30%; height: 100%; color: #434343; /
border:1px solid #ccc; /}
.active { color: rgb(89, 246, 160); border-bottom: 4rpx solid rgb(89, 246, 128);}
/
设置下面内容区域的页面情况 */swiper { text-align: left; height: 8000rpx;}
.gongsi, .gongsi-content { height: 100rpx;}
.geren, .geren-content { height: 100%;}
.jiating, .jiating-content { height: 100%;}
.shehui .shehui-content { height: 100%;}
.goujia, .goujia-content { height: 100%;}
微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码

index.js
微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码
Page({ data: { /** * 页面配置 */ duration:300, currentTab: 0, autoplay:false, interval:3000 },//滑动切换 问题就出在这个方法里 swiperTab: function (e) { var that = this; if (e.detail.source == ‘autoplay’ || e.detail.source == ‘touch’) { that.setData({ currentTab: e.detail.current }); } }, //点击切换 clickTab: function (e) { var that = this; if (this.data.currentTab === e.target.dataset.current) { return false; } else { console.log(‘clickTab2’) that.setData({ currentTab: e.target.dataset.current }) } },

微信小程序swiper组件真机模拟时疯狂轮播 问题解决完整代码