路由重复报错解决方法
通常情况
在router/index.js文件下
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
push没有用的话
const originalReplace = Router.prototype.replace
Router.prototype.replace = function replace (location) {
return originalReplace.call(this, location).catch(err => err)
}