Vue router报错:NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}的解决方法

在main.js下添加:

import Router from 'vue-router'
Vue.use(Router)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

 

 

————————————————
原文链接:https://blog.csdn.net/xieminglu/java/article/details/100153795
posted @ 2020-04-07 17:16  奔向太阳的向日葵  阅读(1582)  评论(0编辑  收藏  举报