VUE 通过id 滚动到指定位置
2021-07-30 本文已影响0人
旧时袋
scrollTopAnimate(id){
this.$nextTick(()=>{
window.scrollTo({top:document.getElementById(id).offsetTop - 138, behavior: 'smooth'})
})
}
scrollTopAnimate(id){
this.$nextTick(()=>{
window.scrollTo({top:document.getElementById(id).offsetTop - 138, behavior: 'smooth'})
})
}