收藏
回答

recycle-view 为什么在加载前几页不会出现屏幕跳动多加载几页之后就会闪跳?

  "{{batchSetRecycleData}}" width="{{width}}" height="{{height}}"  id="recycleId" bindscrolltolower="bindscrolltolower" >
    <view slot="before" style="height:20rpx">view>
    <recycle-item wx:for="{{rows}}" class="s_pic" wx:key="key" style="display:block" >
      <image  class="img_loading" src="{{IMG_URL}}hardcover/{{item.smallPic}}" mode="aspectFill"    />
    recycle-item>
  recycle-view>

//滚动到底部监听,分页加载
  bindscrolltolower(e) {
    console.log('滚动到底部----');
    // if (this.postflg) {
      // this.postflg = false;//请求完成前不再更改页码请求接口
      this.data.pageNo++;
      this.GetData();
    // }
  },

 onLoad: function(options) {
    wx.setNavigationBarTitle({
      title: '精装图库'
    }); //设置标题栏名称
  
    var than =this;
        let height = getApp().globalData.systemInfo.windowHeight;
        let width = getApp().globalData.systemInfo.windowWidth;
        than.rows = createRecycleContext({
          id: 'recycleId',
          dataKey: 'rows',
          page: than,
          itemSize: {
            width: 175,
            height: 117
          }
        })
       than.setData({ height: height, width: width });
        than.GetData();
        // than.rows.update(beginIndex, list)
        // than.rows.destroy()
  
  },
回答关注问题邀请回答
收藏

3 个回答

登录 后发表内容
问题标签