mounted () { this.$router.afterEach((to, from, next) => { window.scrollTo(0, 0); //跳到别的页面会自动滚动底部 }); history.pushState(null, null, document.URL); },
解决 vue路由跳转到新页面底部而不是顶部和后退到首页就不让他继续后退了
猜你喜欢
转载自www.cnblogs.com/jongsuk0214/p/9365027.html
今日推荐
周排行