Sync migrated iOS modules
This commit is contained in:
@ -17,7 +17,7 @@ Main 模块负责登录后的主界面 Tab 容器,以及当前尚未迁移页
|
||||
- `statistics`:数据
|
||||
- `profile`:我的
|
||||
|
||||
`HomeRootView` 已接入真实的 `HomeView`,`ProfileRootView` 已接入真实的 `ProfileView`。订单和数据 Tab 当前仍使用 `PlaceholderTabRootView`,用于保留入口和验证 Tab 内导航。
|
||||
`HomeRootView` 已接入真实的 `HomeView`,`OrdersRootView` 已接入真实的 `OrdersView`,`StatisticsRootView` 已接入真实的 `StatisticsView`,`ProfileRootView` 已接入真实的 `ProfileView`。
|
||||
|
||||
## 导航流程
|
||||
|
||||
@ -25,7 +25,7 @@ Main 模块负责登录后的主界面 Tab 容器,以及当前尚未迁移页
|
||||
2. `TabView` 使用 `appRouter.selectedTab` 作为选中状态。
|
||||
3. 每个 Tab 创建自己的 `NavigationStack(path:)`。
|
||||
4. 路径绑定来自 `appRouter.binding(for:)`。
|
||||
5. 占位页点击“打开详情”时,通过当前 Tab 注入的 `RouterPath` push 一个 `AppRoute.placeholder`。
|
||||
5. Tab 内页面需要进入尚未迁移的子页面时,通过当前 Tab 注入的 `RouterPath` push 一个 `AppRoute.placeholder`。
|
||||
6. `navigationDestination` 根据 `AppRoute` 展示详情页。
|
||||
7. 子页面展示时读取 `AppRoute.hidesTabBarWhenPushed`,默认隐藏底部 TabBar。
|
||||
|
||||
|
||||
@ -17,14 +17,14 @@ struct HomeRootView: View {
|
||||
/// 订单根视图,占位承载后续订单模块迁移内容。
|
||||
struct OrdersRootView: View {
|
||||
var body: some View {
|
||||
PlaceholderTabRootView(title: "订单", systemImage: "doc.text")
|
||||
OrdersView()
|
||||
}
|
||||
}
|
||||
|
||||
/// 数据根视图,占位承载后续统计模块迁移内容。
|
||||
struct StatisticsRootView: View {
|
||||
var body: some View {
|
||||
PlaceholderTabRootView(title: "数据", systemImage: "chart.bar")
|
||||
StatisticsView()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user