vue 监听滚动事件
window.addEventListener('scroll', this.handleScroll);
document.removeEventListener('scroll', this.handleScroll);
handleScroll() {
console.log('11');
//获取滚动时的高度
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop;
//let oneHeight = this.$refs.scrollOne.scrollTop;
//let twoHeight = this.$refs.scrollTwo.offsetHeight + oneHeight;
//let threeHeight = this.$refs.scrollThree.offsetHeight + twoHeight;
if (scrollTop > 0) {
//滚动大于0的时候要做的操作
// document.activeElement.blur();
//window.pageYOffset = 0;
//document.documentElement.scrollTop = 0;
//document.body.scrollTop = 0;
}
},

浙公网安备 33010602011771号