解决ElementUI导航栏重复点菜单报错问题

在router.js的配置文件中 添加如下代码: 

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

其中, VueRouter为引入的vue-router的变量

posted @ 2020-06-15 16:49  凌妖  阅读(606)  评论(0)    收藏  举报