We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
目录:
-- pages | layout.tsx 全局布局组件. 充当视图入口, 配置国际化, 主题 basicLayout.tsx 业务页面的统一布局. 首页布局. | session | layout.tsx 登录, 注册等匿名页面的简单布局 index.tsx 希望此处的布局为 "layout" > "layout" | system | index.tsx 希望system和business等业务页面布局为:"layout" > "basicLayout" | business | index.tsx
我是很喜欢约定式路由的, 但似乎无法实现上面的布局需求. 如果将system, business, basicLayout.tsx再放到一层目录中是可以, 但似乎不够优雅. 而且现有代码已经很多, 此时不敢随便动目录了. 请问在defineRoutes中如何配置, 这个折腾半天, 官网文档没看懂.
The text was updated successfully, but these errors were encountered:
目前基于约定的情况下如果路由间的布局组件是有差异的,可以参考以下两种思路:
Sorry, something went wrong.
谢谢你的分析, 我决定尝试下第二种思路. 目前我是第一种, 整个项目只有一个layout, 里面太多的if...else. 😅 感觉第二种按需引入basicLayout更灵活. 且各业务视图目录的layout如无自定义需求, 只是把basicLayout包装下, 逻辑也比较清晰.
No branches or pull requests
目录:
我是很喜欢约定式路由的, 但似乎无法实现上面的布局需求.
如果将system, business, basicLayout.tsx再放到一层目录中是可以, 但似乎不够优雅. 而且现有代码已经很多, 此时不敢随便动目录了.
请问在defineRoutes中如何配置, 这个折腾半天, 官网文档没看懂.
The text was updated successfully, but these errors were encountered: