better() {
this.$nextTick(() => {
this.scroll = new BScroll(this.$refs.wrapper, {
pullUpLoad: { //
threshold: -5,
resizePolling: 60
},
})
this.scroll.on("scroll", (pos) => {
console.log(pos.y)
console.log("aaaa",this.$refs.tabs.offsetTop)
})
this.load() //
})
},
this.scroll.on("scroll", (pos) => {
console.log(pos.y)
console.log("aaaa",this.$refs.tabs.offsetTop)
})
<div ref="tabs">
<van-tabs v-model="active" animated @click="onClick">
<van-tab v-for="(item,index) in menuList" :title="item.name" :key="index"></van-tab>
</van-tabs>
</div>