NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}

在使用ElementUi时点击同一个路由,页面报错

查询后解决方式如下

import Router from 'vue-router'

const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

  

 

posted @ 2019-08-14 11:50  随意滴博客  阅读(10425)  评论(0编辑  收藏  举报