swiper.js 滑动时报错

swiper.js 3.0
在滑动的时候报这个错误:

VM2191:16 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
   at t.v.getTranslate (eval at globalEval (jquery.min.js?v=v1_201807:2), <anonymous>:16:2156)
   at t.v.getWrapperTranslate (eval at globalEval (jquery.min.js?v=v1_201807:2), <anonymous>:16:2723)
   at HTMLDocument.v.onTouchMove (eval at globalEval (jquery.min.js?v=v1_201807:2), <anonymous>:15:25370)
请问大神这是哪里出错了呀

初始化:

var mySwiper = new Swiper ('.swiper-container', {
           pagination: null,
            slidesPerView: 'auto',
            paginationClickable: true,
            spaceBetween: 0,
            freeMode: true,
            resistanceRatio: 0.5
        }) ;
阅读 11.7k
2 个回答

@SomeThinkings
就是因为我们的前台给我时在某个个js文件用.swiper-container样式 初始化过一次其它的 swiper插件了。
我在我自己的代码里又初始话了一次所以报错了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题