Vue报错:Uncaught (in promise) 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)
}
如下所示:

至此问题解决
学以致用,知行合一

浙公网安备 33010602011771号