Files
suixinkan_ios_new/suixinkan/Features/Main/Views/PlaceholderRootViews.swift
汉秋 703078352c 从 iOS 17 Observation 迁移至 iOS 16 兼容的 Combine 架构
将最低部署版本降至 iOS 16,以 ObservableObject 替换 @Observable,新增导航与 UI 兼容层,并补充登录冒烟 UI 测试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 10:16:35 +08:00

78 lines
1.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// PlaceholderRootViews.swift
// suixinkan
//
// Created by Codex on 2026/6/18.
//
import SwiftUI
///
struct HomeRootView: View {
var body: some View {
HomeView()
}
}
///
struct OrdersRootView: View {
var body: some View {
OrdersView()
}
}
///
struct StatisticsRootView: View {
var body: some View {
StatisticsView()
}
}
///
struct ProfileRootView: View {
var body: some View {
ProfileView()
}
}
/// Tab
private struct PlaceholderTabRootView: View {
@EnvironmentObject private var router: RouterPath
let title: String
let systemImage: String
var body: some View {
VStack(spacing: 16) {
Image(systemName: systemImage)
.font(.system(size: 44, weight: .semibold))
.foregroundStyle(.tint)
Text(title)
.font(.title2.weight(.semibold))
Button {
router.navigate(to: .placeholder(title: "\(title)详情"))
} label: {
Label("打开详情", systemImage: "chevron.right")
}
.buttonStyle(.borderedProminent)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color(.systemGroupedBackground))
}
}
/// Tab NavigationStack
struct PlaceholderDetailView: View {
let title: String
var body: some View {
Text(title)
.font(.title3.weight(.medium))
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color(.systemGroupedBackground))
.navigationTitle(title)
}
}