<swiper :duration="150" :current="selectIndex" :style="{height:scrollHeight}" @animationfinish="changeTab" > <swiper-item v-for="(tabItem,ins1) in 2" :key="ins1"> <scroll-view scroll-y="true" class="scroll" :style='{height: scrollHeight}' @scrolltolower="loadMore"> <view v-for="(item, index) in dataList" :key="index"> <view class="item">重庆乐菲亚装饰材料有限公司{{index}}</view> </view> </scroll-view> </swiper-item> </swiper>
onReady() { uni.getSystemInfo({ success: resu => { const query = uni.createSelectorQuery() query.select('.scroll').boundingClientRect() query.exec(res => { // console.log('打印页面的剩余高度', res); this.scrollHeight = resu.windowHeight - res[0].top + 'px'; }) } }) },