收藏
回答

Swiper 无法正常刷新

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug Swiper 微信安卓客户端 WeChat7.0.131640 2.11.0

在小米8(其它IOS、安卓机)也试过。

swiper 在用for循环渲染页面,会有些面页无法正常渲染出来,在调试模式下移标移到对应的Wxml节点时,才可以正常刷新

http://file.hellobabo.com/hellobabo/statics/upload/demo/0ac68457920802a2e05cde72f5f8a214.mp4


<view class="container">


  <view class="content">


    <!-- 背景 -->
    <view class="bg-box">
      <image class="bg-top" src="{{res_server_url}}/images/mybook/bg_top.png" mode="widthFix" />
      <image class="bg-bottom" src="{{res_server_url}}/images/mybook/bg_bottom.png" mode="widthFix" />
    </view>


    <!-- 绘本展示 -->
    <swiper duration="500" >
      <block wx:for="{{list}}" key="id">
        <swiper-item>


          <!-- 背景 -->
          <view class="bg-box">
            <image class="bg" src="{{res_server_url}}/images/mybook/bg.jpg" mode="widthFix" />
            <view class="bg-center">
              <image class="more-msg" src="{{res_server_url}}/images/mybook/more_msg.png" mode="widthFix"></image>
              <image src="{{res_server_url}}/images/mybook/flowerpot.png" mode="widthFix" />
            </view>
          </view>


          <view class="info-box">
            <view class="top-box">
              <!-- 书本 -->
              <view class="book-box" bindtap="onGoodsClick">
                <image class="book" src="{{res_server_url}}/images/mybook/num_{{index + 1}}.png" mode="widthFix"></image>
                <block wx:if="{{list[index]}}">
                  <image class="goods-cover" src="{{list[index].goods_img}}" mode="aspectFill"></image>
                  <image class="upload-warn-tips" wx:if="{{list[index].status<5}}" src="{{res_server_url}}/images/mybook/upload_warn_tips.png" mode="widthFix"></image>
                  <image class="wait-delivery-tips" wx:if="{{list[index].status >=5 && list[index].status != 20}}" src="{{res_server_url}}/images/mybook/wait_delivery_tips.png" mode="widthFix"></image>
                </block>
              </view>


              <!-- 右上角留言 -->
              <view class="msg-box" >
                <block wx:if="{{list[index]}}">
                  <view class="msg-item" style="left: 15rpx;">
                    <view class="name-txt">{{index}}{{'千与千寻:'}}2020.04.03</view>
                    <e-sticky-note skin="{{res_server_url}}/images/mybook/sticky_note_yellow">
                      宝贝的第一套个性化绘本</e-sticky-note>
                  </view>


                  <view class="msg-item" style="margin-top: 20rpx;">
                    <view class="name-txt">{{'千与千寻:'}}2020.04.06</view>
                    <e-sticky-note skin="{{res_server_url}}/images/mybook/sticky_note_yellow">
                      今天开始跟宝贝制作绘本啦</e-sticky-note>
                  </view>
                </block>
              </view>
            </view>


            <view class="bottom-box">
              <!-- 下面留言 -->
              <view class="msg-box" wx:if="{{list[index]}}">
                <view class="msg-item" style="margin-top: 30rpx;left: 0rpx;">
                  <view class="name-txt">{{'千与千寻:'}}2020.04.03</view>
                  <e-sticky-note skin="{{res_server_url}}/images/mybook/sticky_note_yellow">
                    宝贝的第一套个性化绘本</e-sticky-note>
                </view>


                <view class="msg-item" style="margin-top: 20rpx;left: 100rpx;">
                  <view class="name-txt">{{'千与千寻:'}}2020.04.06</view>
                  <e-sticky-note skin="{{res_server_url}}/images/mybook/sticky_note_pink">
                    今天开始跟宝贝制作绘本啦</e-sticky-note>
                </view>


                <view class="msg-item" style="margin-top: 20rpx;left:-50rpx;">
                  <view class="name-txt">{{'千与千寻:'}}2020.04.06</view>
                  <e-sticky-note skin="{{res_server_url}}/images/mybook/sticky_note_orange">
                    今天开始跟宝贝制作绘本啦</e-sticky-note>
                </view>
              </view>
            </view>
          </view>


        </swiper-item>
      </block>
    </swiper>


    <view class="foot">
      <!-- 自定义页码 -->
      <view class="page-num-box">
        <image wx:for="{{list}}" wx:key="id" src="{{res_server_url}}/images/mybook/{{showIndex == index ? 'dot_current' : 'dot_default'}}.png" mode="widthFix"></image>
      </view>


      <!-- 按钮 -->
      <view class="btn-box" bindtap="onGoodsClick" wx:if="{{list[showIndex].status<5}}">
        <e-btn skin="{{res_server_url}}/images/custom/btn_lg_orange.png">
          上传相片
        </e-btn>
      </view>
    </view>


  </view>


</view>
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签