解决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的变量
在router.js的配置文件中 添加如下代码:
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
其中, VueRouter为引入的vue-router的变量