Sync order detail and scanner verification
This commit is contained in:
@ -13,6 +13,7 @@ enum AppRoute: Hashable {
|
||||
case placeholder(title: String)
|
||||
case home(HomeRoute)
|
||||
case profile(ProfileRoute)
|
||||
case orders(OrdersRoute)
|
||||
|
||||
/// 返回该路由通过 NavigationStack push 后是否隐藏底部 TabBar。
|
||||
var hidesTabBarWhenPushed: Bool {
|
||||
@ -29,6 +30,21 @@ enum AppRoute: Hashable {
|
||||
route.destinationView
|
||||
case .profile(let route):
|
||||
route.destinationView
|
||||
case .orders(let route):
|
||||
route.destinationView
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension OrdersRoute {
|
||||
/// 构建订单模块二级路由对应的目标页面。
|
||||
@ViewBuilder
|
||||
var destinationView: some View {
|
||||
switch self {
|
||||
case .storeDetail(let item):
|
||||
StoreOrderDetailView(item: item)
|
||||
case .writeOffDetail(let item):
|
||||
WriteOffOrderDetailView(item: item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user