收藏
回答

swiper组件问题

问题模块 框架类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
API和组件 小程序 swiper图片较多时出现bug 微信iOS客户端 6.6.5 1.9.91





图片较多多试几次必定复现


<swiper class='swiperView' bindchange='swiperChange'>

   <swiper-item wx:for="{{arr}}" wx:key="" wx:for-index="index">

       <image src="{{item.imgPath}}" />

   swiper-item>

swiper>




JS代码


arr: [{ id: 495761, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/k4KAssS2rwyaXEfpKfYxCaeDNmydNTa3.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495762, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/apsKYEsHZx8MAdC6ZsaQCap2rkiTxzRW.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495763, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/xbHadJZDJSGawprFxP6NTP58pXttS3mA.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495764, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/epY4sXtRPd6RXFwiPHZWKidsecSfaQCh.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495765, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/Mcf2eekPeDjdyEensQRXmtDeM75FG7ZB.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495766, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/Jrw5xZ8K4EZzJHhs4GRpZS2nWDdhXZn5.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495767, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/8d4tkc8n4BmHi5D433b5kKCy2QwKf2rS.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495768, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/TjQRRCjzYhCP7Nr3C36BsFdXfxNmdGK4.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495769, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/hYsnzms7NXjfnHtephP8bMiJRbRaENRF.jpg", imgType: 1, imgLocation: "effect", imgLocationName: "效果图" },

{ id: 495770, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/ZKrdQZBbtXSYA5EEdZ57semrBnDsydNC.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495771, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/t86ttGNsT7FyweFybM3cN5Q6GjTGsbTj.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495772, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/YXFwW86djC44jhDy2bhzRtkDnM8ar4ta.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495773, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/bzkT6cQ7KhFnNHpTfpcWT4K52FmN4py7.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495774, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/sk3DpJY36FnPjF8sfx5ehTp2y2hzfpEX.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495775, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/KMW3MBcSMCFB4fHaJH22Js3cEZEAid4h.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495776, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/2efRTD6QrbeFzr6Yn2bJsMWcDjrr5XPp.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495777, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/enQTdjT2mCAXHPnyd7yiK58766TpXck8.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495778, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/4iCiHExAyJa6QSDYKfy2stAZMwy8zKcp.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495779, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/h4rE3yfcZB8jzZMzARJP42zYCm4YA2XE.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495780, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/AxtatPjTRmjcDZ74BHCywpaniNyfXKSa.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495781, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/Bnk4jm4BE8Rkn2spKZWABJxmhnj7tjQh.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495782, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/y3wfW5AyAbGC6J8iStT7f4kTfccCyBEe.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495783, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/znw2Jxr5PtJjWwtBrCxAYhyQjBYSM2Kk.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495784, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/DBeeaWFreDtGnzKKAwQeAHpfX5FAADfK.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495785, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/3NTYZhSjDeC48aW5xQ8MFEH3ztXR4RRd.png", imgType: 1, imgLocation: "real", imgLocationName: "实景图" },

{ id: 495786, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/c8YXQDz8MrwtrHCXxCepRNTBhTCjm6RM.png", imgType: 1, imgLocation: "match", imgLocationName: "配套图" },

{ id: 495787, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/35Gw6me3ZwbtH6WQPErN8MPGpdAQ3C8m.png", imgType: 1, imgLocation: "match", imgLocationName: "配套图" },

{ id: 495788, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/PYASpcRmizE8CXrf6KhpRnGpzCX7JWJN.jpg", imgType: 1, imgLocation: "match", imgLocationName: "配套图" },

{ id: 495789, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/NEJJzAAHQ7mTT2KxcXxkmSWd67mMMwRz.jpg", imgType: 1, imgLocation: "match", imgLocationName: "配套图" },

{ id: 495790, imgPath: "http://t-sjpt-oss.oss-cn-shenzhen.aliyuncs.com/images/devImage/3BsdAcscDNNntQFehdSssmhrfKia5FQZ.png", imgType: 1, imgLocation: "match", imgLocationName: "配套图" }],




swiperChange: function (e) {

console.log("current", e.detail.current)

},





快速划动过程中突然变为0,就卡死不能滑动。

最后一次编辑于  2018-03-14  (未经腾讯允许,不得转载)
回答关注问题邀请回答
收藏

4 个回答

  • 后会无期
    后会无期
    2018-05-13

    请问楼主这个滑动卡死的问题解决了没有呢?

    2018-05-13
    赞同
    回复 1
    • rualD
      rualD
      2018-06-15

      木有

      2018-06-15
      回复
  • rualD
    rualD
    2018-04-25

    小程序swiper组件肯定有问题

    2018-04-25
    赞同
    回复
  • rualD
    rualD
    2018-04-25

    图片多什么都不做都会抽搐的,这个我们这边很早就测出来了,只是没办法解决,没人理我的帖子。

    2018-04-25
    赞同
    回复
  • PENL L
    PENL L
    2018-04-20

    我也遇到了。

    同时还有另一个快速滑动,抽搐的问题。看了官方解答后。不进行setData current。是解决了

    但是,测试了发现,快速滑动,会突然,current突然跑到0去了

    2018-04-20
    赞同
    回复