解决vue路由跳转页面之后页面不从最顶端显示问题

mac2022-06-30  15

在router/index.js文件中

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

转载于:https://www.cnblogs.com/wxyz9527/p/11206734.html

最新回复(0)