-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
有关addRoute父子路由name、path相同时的处理结果问题 #2391
Comments
Duplicate of #2266 |
If the names are different, two routes will be created, as shown below
i hope my route list is clean,only has one ErrorPageSon route insert.
#2267 throw Error i think that reasonable for same name,This can help people know the specific cause of errors in the development environment The above is just my personal opinion. I just hope that my routing list can be cleaner and there will be no extra routes |
Reproduction
https://codesandbox.io/p/sandbox/vue-router-4-addroute-bug-4t7fyx
Steps to reproduce the bug
[Vue Router warn]: Finding ancestor route "/:path(.)" failed for "/:path(.)"
Expected behavior
在父路由被删除,
matchers.lastIndexOf(insertionAncestor, upper - 1)
返回-1时,使用此路由的原本upper,而不是返回-1的upperActual behavior
Additional information
打开Reproduction,f12然后点击click here按钮,可以看到现在vue-router对于父子路由name,path相同时addRoute的处理结果
The text was updated successfully, but these errors were encountered: