小程序组件 scroll-view 下拉加载更多,触底触发事件,容器高度设置

 

 

var that = this;

    /**
     * 获取当前设备的宽高
     */
    wx.getSystemInfo({ 
      success: function (res) { 
          that.setData({ 
              clientHeight: res.windowHeight -30
          }); 
      } 
});

 

 

style="height: {{clientHeight?clientHeight+'px':'auto'}}"

 

posted @ 2020-10-16 14:52  Action_swt  阅读(1129)  评论(0编辑  收藏  举报