mounted() {
window.addEventListener('scroll', this.handleScroll, true)
},
handleScroll(e) {
const scrollTop = e.target.scrollTop
if (scrollTop > 361) {
this.isFixed = true
console.log('固定')
} else {
this.isFixed = true
}
},
vue监听滚动 距离
最新推荐文章于 2025-05-24 08:00:30 发布