解决vue报错:NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"}

解决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)
}

 

 完美解决

posted @ 2019-10-10 16:51  Angel-01  阅读(649)  评论(0编辑  收藏  举报