收藏
回答

新版微信开发者工具网页无法运行 swiper.js

框架类型 问题类型 操作系统 工具版本
小程序 Bug Windows 1.03

- 当前 Bug 的表现(可附上截图)

    不可滑动,可点击

- 预期表现

    可滑动,可点击


- 复现路径

    

- 提供一个最简复现 Demo

    

var swiper3 = new Swiper("#swiper-newsList", {

observer: true,

observeParents: true,

preventInteractionOnTransition: true,

autoHeight: true,

});

var swiper2 = new Swiper('#swiper-tags', {

loop: true,

loopAdditionalSlides: 1,

slidesPerView: 'auto',

observer: true,

observeParents: true,

preventInteractionOnTransition: true,

onClick: function (swiper) {

swiper3.slideTo(swiper.clickedIndex, 300, false);

$('#news_nav_' + swiper.clickedIndex + '').addClass('active').siblings().removeClass('active');

var ss = swiper.slides[swiper.clickedIndex].id;

that.currentTag.set(ss);

}

});

swiper3.params.onSlideChangeStart = function (swiper) {

swiper2.slideTo(swiper.activeIndex, 300, false);

$('#news_nav_' + swiper.activeIndex + '').addClass('active').siblings().removeClass('active');

var ss = swiper.slides[swiper.activeIndex].id;

that.currentTag.set(ss);

}


回答关注问题邀请回答
收藏
登录 后发表内容