export default new Router({
mode:'history',
routes,
scrollBehavior (to, from ,savedPosition) {
return {x:0,y:0}
}
});
解决方法:
在路由配置上加上
scrollBehavior (to, from ,savedPosition) {
return {x:0,y:0}
}
export default new Router({
mode:'history',
routes,
scrollBehavior (to, from ,savedPosition) {
return {x:0,y:0}
}
});
解决方法:
在路由配置上加上
scrollBehavior (to, from ,savedPosition) {
return {x:0,y:0}
}