可以在全局钩子中加入
router.beforeEach((to, from, next) => {
    next()
    window.scrollTo(0,0)
})

scrollTo() 方法可把内容滚动到指定的坐标。
语法:
scrollTo(xpos,ypos)

相关文章: