很小的功能,记录一下
mounted() {
window.addEventListener('scroll', this.handleScroll, true)
},
methods: {
handleScroll: function() {
console.log(document.documentElement.scrollTop || document.body.scrollTop)
}
}
很小的功能,记录一下
mounted() {
window.addEventListener('scroll', this.handleScroll, true)
},
methods: {
handleScroll: function() {
console.log(document.documentElement.scrollTop || document.body.scrollTop)
}
}