vue实时监听页面滑动,获取top值
vue实时监听页面滑动,获取top值
mounted() {
window.addEventListener(“scroll”, this.scroll);
},
methods: {
scroll() {
let scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scroll...
转载
2019-07-20 11:37:30 ·
2202 阅读 ·
0 评论