在router.js文件
const router = new VueRouter({
routes, // 为路由
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 }
}
});```
在router.js文件
const router = new VueRouter({
routes, // 为路由
scrollBehavior (to, from, savedPosition) {
return { x: 0, y: 0 }
}
});```