Skip to content
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

多级嵌套路由无法渲染到一个根 router-view #3097

Closed
jiankafei opened this issue Jan 13, 2020 · 1 comment
Closed

多级嵌套路由无法渲染到一个根 router-view #3097

jiankafei opened this issue Jan 13, 2020 · 1 comment

Comments

@jiankafei
Copy link

@jiankafei jiankafei commented Jan 13, 2020

What problem does this feature solve?

路由的嵌套配置就是为了说明路由的层级情况,父子关系,但现在的嵌套路由却恰恰相反,下一级的路由只能渲染到父级的 router-view 里,这种设计有点反人类,而且目前的设计完全可以通过组件的方式很方便的解决,为什么这么设计,能说了理由吗,我只知道同级路由是没有必要前进或者返回的,就像四个底栏视图,彼此之间就是同级的,不会因为从底栏第一视图切换到第二视图,按返回键又返回到第一视图,而是直接退出,这更符合原生app的路由设计,如果当前的路由设计就是为了应对这种情况,我觉得完全是反人类。

What does the proposed API look like?

嵌套路由是为了说明路由层级,而不是视图层级,视图层级的局部切换通过组件解决,所有路由渲染到一个根 router-view 里,路由就应该是页面切换,不是局部切换,局部切换都是同级切换,因此根本没必要路由支持。

@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Jan 13, 2020

If you are experiencing a bug, please open a bug report with a boiled down reproduction. Current behavior for nested router-views is working as intended

@posva posva closed this Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.