const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
// // 路由前置导航守卫
router.beforeEach((to, from, next) => {
// 根据路由元信息设置文档标题
window.document.title = to.meta.title
next()
})两段常用的vue代码
本文著作权归作者 [ admin ] 享有,未经作者书面授权,禁止转载,封面图片来源于 [ 互联网 ] ,本文仅供个人学习、研究和欣赏使用。如有异议,请联系博主及时处理。

