解决vue报错:NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}
这个适合所有vue的UI框架
在main.js下添加一下代码:
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
完美解决