Loading... 在路由守卫里面配置如下: ``` const router = new VueRouter({ // 路由切换返回顶部 scrollBehavior: () => ({ x: 0, y: 0 }),mode: 'history', base: process.env.BASE_URL, routes, }); ``` Last modification:September 5, 2023 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 如果觉得我的文章对你有用,请随意赞赏
One comment
学到了,这就去试试