在写路由时添加了如下代码,报错,但是并不影响结果
activated(){
this.$router.push(this.path);
},
解决办法:
在router/index.js中加入如下代码
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}