-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
自定义layout组件,props里拿不到config的routes,没办法自己实现菜单的渲染? #10177
Comments
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。 |
umi3. 升级到 um4 会有这个问题,props 拿不到 route 信息了 我在看能不能通过 useAppData 来做 |
可以通过
|
|
可以可以, 之前都没留意到, 也是个方法, 学到了 只是我试了下, |
Background
项目中需要多个layout布局
Proposal
项目中有多种layout的需求,那么就需要自定义layout组件,在layout组件内自己实现头部,菜单,底部。现在的问题在于layout组件的props是空的拿不到config的routes,这种情况下如何拿到routes并实现菜单的渲染呢?
Additional context
The text was updated successfully, but these errors were encountered: