1、路由点击返回时或者点击 router-link 会造成
报错时。
解决方法是:
添加这段代码,就可以解决报错
const originalPush = Router.prototype.push;
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
};
相关文章:
1、路由点击返回时或者点击 router-link 会造成
报错时。
解决方法是:
添加这段代码,就可以解决报错
const originalPush = Router.prototype.push;
Router.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
};
相关文章: