- 在
Vue中路由报错NavigationDuplicated: Avoided redundant navigation to current location: "/",原因是路由重复。 - 解决方案
在router文件夹下的index.js中加入下面代码,解决!
const originalPush = VueRouter.prototype.push VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch(err => err) }

