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

请教一个问题,关于路由结构的 #9

Closed
zguiyang opened this issue Apr 6, 2022 · 1 comment
Closed

请教一个问题,关于路由结构的 #9

zguiyang opened this issue Apr 6, 2022 · 1 comment

Comments

@zguiyang
Copy link

zguiyang commented Apr 6, 2022

看了下源码,发现代码中将多层嵌套路由通过mapTwoLevelRouter方法进行了类似扁平化的处理:
image

  1. 这样做的目的是什么呢?
  2. 我发现这样处理后,访问页面时就会直接访问到/next/menu2/menu-2-1/xxx这样,不会继承到父组件了,假如我有一个子页面要继承父页面视图的时候,还能通过路由结构配置来达到继承的效果吗?
@qingqingxuan
Copy link
Owner

1、这样做的目的是为了实现多级缓存的功能,把多级缓存转成两级方便实现缓存
2、不是很明白你说的子页面要继承父页面视图是什么意思……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants