代码调整
This commit is contained in:
parent
4a7e0285a8
commit
bb296a7238
@ -876,4 +876,10 @@ router.beforeEach((to, from, next) => {
|
||||
next();
|
||||
});
|
||||
|
||||
// 兼容 vue-router在3.1.0版本以上的路由跳转使用的是 promise 的方式
|
||||
const originalPush = Router.prototype.push;
|
||||
Router.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
|
||||
export default router;
|
||||
|
Loading…
Reference in New Issue
Block a user