<scroll-view
:show-scrollbar="true"
@scrolltolower="lowerBottom"
:style="{ height: scrollHeight + 'px' }"
class="scroll-view"
scroll-y="true"
refresher-enabled="true"
:refresher-triggered="refresh"
@refresherrefresh="onRefresh"
>
onReady() {
//获取页面屏幕的高度
const { windowHeight } = uni.getSystemInfoSync();
console.log(windowHeight);
//tabbar
let systemInfo = uni.getSystemInfoSync();
let tabbarHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom;
//tab切换 到顶部的距离
uni
.createSelectorQuery()
.selectAll('.foot')
.boundingClientRect((data) => {
console.log(data);
console.log(data[0].top);
this.scrollHeight = windowHeight - data[0].top - tabbarHeight;
})
.exec();
},