收藏
回答

使用swiper预览轮播图不显示,开发工具上正常,原因是什么呢?

<swiper class"screen-swiper square-dot" indicator-dots="true" autoplay="true" interval="3000" duration="500">

<block wx:for="{{swiperList}}" wx:key>

<swiper-item>

<image src="{{item}}" mode="aspectFill"></image>

</swiper-item>

</block>

</swiper>

.screen-swiper {

width:100%

height:276rpx

}

.screen-swiper image{

width:100%;height:100%

}


回答关注问题邀请回答
收藏

7 个回答

  • 
    
    2020-05-22

    遇到同样的问题,但是好的是,我另一个页面上的swiper在出问题的安卓机上市可以正常显示的,后来我看了下,正常显示的那个swiper,看到他最外层的width不是100%,而是95%,所以猜测可能是超出显示边界引起的不能正常显示。

    2020-05-22
    有用
    回复
  • 睡着了 别喊我
    睡着了 别喊我
    2020-04-30

    我也遇到这个问题

    有时显示 有时不显示

    是不是 和渲染时 自动播放 有关系?

    2020-04-30
    有用
    回复
  • 。。。
    。。。
    2020-04-11

    <swiper class="screen-swiperindicator-dots="truecircular="trueautoplay="trueinterval="5000duration="500">

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

        <image src="{{item}}mode="aspectFill"></image>

      </swiper-item>

    </swiper>

    这样子就可以了

    2020-04-11
    有用
    回复
  • 小乙
    小乙
    2020-04-11

    你好,请问你这个问题解决没有,我用跟你差不多的代码,就是实现不了效果。


    2020-04-11
    有用
    回复
  • 是小白啊
    是小白啊
    2020-01-14

    使用本地图片看下是不是网络图片链接的问题

    2020-01-14
    有用
    回复 1
    • 张艾斌
      张艾斌
      2020-01-16
      我也遇到,我先用本地图片测试没问题,发现如果使用网络地址就无法在真机上切换,我才用的是将网路图片下载到本地,然后显示即正常,测试的是安卓。
      2020-01-16
      回复
  • LokNum🎣
    LokNum🎣
    2020-01-14

    你的key呢???


    2020-01-14
    有用
    回复 2
    • 。。。
      。。。
      2020-01-14
      这个跟key没多大关系吧,之前设置了,没啥用
      2020-01-14
      回复
    • LokNum🎣
      LokNum🎣
      2020-01-14回复。。。
      开调试看看呗
      2020-01-14
      回复
  • 子不语
    子不语
    2020-01-14

    你好,代码片段,请:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    --↓↓👍觉得有帮助就点个赞呗~

    2020-01-14
    有用
    回复
登录 后发表内容
问题标签