微信小程序获取滚动标签位置高度

wxml
<scroll-view  bindscroll="scroll">
     123
    </scroll-view>
  <view wx:if="{{(list+systemInfo.screenHeight)/systemInfo.screenWidth - 6500/1125 < -0.2}}"></view>
  <view class="pull" wx:else>
    123
  </view>
js
  scroll: function (e) {
    this.setData({
      list: e.detail.scrollTop,
    });
    // let list = e.detail.scrollTop;
    // console.log(list);
  },
 data:{
    systemInfo: wx.getSystemInfoSync(),
    list: "",
}
posted @ 2021-12-31 11:11  阳菜  阅读(813)  评论(0)    收藏  举报