原文:http://www.jb51.net/article/129270.htm
main.js入口文件配合vue-router写这个
router.afterEach((to,from,next) => { window.scrollTo(0,0);
});