-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug Report] 升级vue-router至3.1以后版本,导航组件重复点击报错 NavigationDuplicated #17044
Comments
Translation of this issue: Element UI version2.11.1 OS/Browsers versionWin/chrome Vue version2.6.10 Reproduction LinkHttps://github.com/vuejs/vue-router/issues/2881 Steps to reproduceUpgrading vue-router to the new version, using el-menu to navigate the page, repeated clicks on a navigation item will report an error in the console, vue-router official gave some modification methods, elementary side is not to be synchronized modification What is Expected?Error-free Navigation Duplicated What is actually happening?Console Navigation Duplicated |
请问解决了吗? |
没有,回退了vue-router版本,暂时用着 |
先卸载vue-router,再安装3.0.7版本可以解决。 |
think you!
…------------------ 原始邮件 ------------------
发件人: "gongshun"<[email protected]>;
发送时间: 2019年8月22日(星期四) 下午3:52
收件人: "ElemeFE/element"<[email protected]>;
抄送: "潘子"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [ElemeFE/element] [Bug Report] 升级vue-router至3.1以后版本,导航组件重复点击报错 NavigationDuplicated (#17044)
先卸载vue-router,再安装3.0.7版本可以解决。
npm uninstall vue-router
npm install [email protected]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
使用 vue-router": "^3.0.7" 版本可以解决。
…------------------ 原始邮件 ------------------
发件人: "xinde"<[email protected]>;
发送时间: 2019年8月22日(星期四) 中午1:13
收件人: "ElemeFE/element"<[email protected]>;
抄送: "潘子"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [ElemeFE/element] [Bug Report] 升级vue-router至3.1以后版本,导航组件重复点击报错 NavigationDuplicated (#17044)
请问解决了吗?
没有,回退了vue-router版本,暂时用着
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Uncaught (in promise) Error: Redirected when going from "????" to "????" via a navigation guard. router 3.5.0+ 会有这个问题,在不降低版本的情况下,不修改发布elementUI 也能解决。具体原因参加router源码hooks部分的 to 验证 ### 解决: 在main.js里
重写 Menu的 handleItemClick 方法 , 具体代码如下,至于想如何处理,看自己系统业务,这里只提供基础的解决办法。
|
vue-router 3.5.2 https://github.com/vuejs/vue-router/blob/v3.5.2/src/util/errors.js vue-router新增了isNavigationFailure方法来判断错误类型 import VueRouter from 'vue-router'
const { isNavigationFailure, NavigationFailureType } = VueRouter |
Element UI version
2.11.1
OS/Browsers version
Win/chrome
Vue version
2.6.10
Reproduction Link
vuejs/vue-router#2881
Steps to reproduce
升级vue-router至新版本后,使用 el-menu 来导航页面,重复点击某一个导航项就会在控制台报错,vue-router官方给出了一些修改方法,element这边是不是要同步修改
What is Expected?
不报错 NavigationDuplicated
What is actually happening?
控制台 NavigationDuplicated
The text was updated successfully, but these errors were encountered: