解决vue路由跳转页面不显示在最顶部问题

在router/index.js文件中

const router = new VueRouter({  scrollBehavior(to,from,saveTop){ if(saveTop){ return saveTop; }else{ return {x:0,y:0} } }, })

猜你喜欢

转载自www.cnblogs.com/wxyz9527/p/11206734.html