在路由切换后 将滚动条置顶 app.vue: mounted() { this.$router.afterEach((to, from, next) => { window.scrollTo(0, 0) }) }