<div class="tabBox" v-if="scrollTop<64"></div>
data() {
return {
scrollTop:null,// 解决滚动问题
};
}
mounted() {
window.addEventListener('scroll', this.handleScroll, true); // 监听(绑定)滚轮滚动事件
},
methods: {
handleScroll (e) {
this.scrollTop = e.target.scrollTop;
},
}