Vue路由控制台错误NavigationDuplicated
控制台错误
解决方法
在mian.js中添加如下代码
import Router from 'vue-router'
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error)
}