赞
踩
const router = new VueRouter({
mode: 'history',
base: process.env.BASE_URL,
routes,
scrollBehavior (to, from, savedPosition) { //解决跳转下一个页面底部的方法
if (savedPosition) {
return savedPosition
} else {
return { x: 0, y: 0 }
}
}
})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。