refactor: app 组合根与导航
This commit is contained in:
36
IosClientKit/Sources/App/AppRootView.swift
Normal file
36
IosClientKit/Sources/App/AppRootView.swift
Normal file
@@ -0,0 +1,36 @@
|
||||
import SwiftUI
|
||||
import CoreUI
|
||||
import FeatureAuth
|
||||
import FeatureHome
|
||||
|
||||
public struct AppRootView: View {
|
||||
@State private var homeViewModel: HomeViewModel
|
||||
|
||||
public init() {
|
||||
_homeViewModel = State(initialValue: AppContainer.makeHomeViewModel())
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
TabView {
|
||||
NavigationStack {
|
||||
HomeScreen(viewModel: homeViewModel)
|
||||
}
|
||||
.tabItem { Label("首页", systemImage: "house.fill") }
|
||||
|
||||
NavigationStack {
|
||||
PlaceholderView("计划", systemImage: "calendar")
|
||||
}
|
||||
.tabItem { Label("计划", systemImage: "calendar") }
|
||||
|
||||
NavigationStack {
|
||||
PlaceholderView("打卡", systemImage: "checkmark.seal.fill")
|
||||
}
|
||||
.tabItem { Label("打卡", systemImage: "checkmark.seal.fill") }
|
||||
|
||||
NavigationStack {
|
||||
AuthScreen()
|
||||
}
|
||||
.tabItem { Label("我的", systemImage: "person.crop.circle") }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user