1、ErrorCode:

2、原因:
ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
3、解决办法(router --》index.js添加以下代码 ):
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
}

本文详细介绍了在使用ElementUI与vue-router 3.0以上版本时,遇到的重复点击菜单导致的报错问题及解决方案。通过在router/index.js中添加特定代码,可以有效避免此错误,确保应用程序的稳定运行。
2843

被折叠的 条评论
为什么被折叠?



