router.afterEach((to,from,next)=>{
window,scrollTo(0,0)
})
vue跳转新页面后回到顶部
原文:https://www.cnblogs.com/wang-xx/p/11240095.html