fix(ios): 修复顶部导航栏间距过大问题
- 所有 Tab 主页面 padding-top 从 statusBarH(44)+16=60pt 改为 8pt - NavigationStack 已自动处理状态栏安全区,无需手动硬编码 - 影响页面:StudyHomeView / LibraryHomeView / AnalysisHomeView / ProfileView Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
49bebad402
commit
e4132dd1c3
@ -12,7 +12,7 @@ struct AnalysisHomeView: View {
|
|||||||
HStack(spacing: 4) { Text("近 7 天").font(.system(size: 12)).foregroundColor(Color.zxF05); Image(systemName: "chevron.down").font(.system(size: 10)).foregroundColor(Color.zxF04) }
|
HStack(spacing: 4) { Text("近 7 天").font(.system(size: 12)).foregroundColor(Color.zxF05); Image(systemName: "chevron.down").font(.system(size: 10)).foregroundColor(Color.zxF04) }
|
||||||
.padding(.horizontal, 12).padding(.vertical, 6).background(Color.zxFill005).clipShape(Capsule()).overlay(Capsule().stroke(Color.zxBorder008, lineWidth: 1))
|
.padding(.horizontal, 12).padding(.vertical, 6).background(Color.zxFill005).clipShape(Capsule()).overlay(Capsule().stroke(Color.zxBorder008, lineWidth: 1))
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20).padding(.top, ZXSpacing.statusBarH + 16).padding(.bottom, 12)
|
.padding(.horizontal, 20).padding(.top, 8).padding(.bottom, 12)
|
||||||
ScrollView {
|
ScrollView {
|
||||||
VStack(spacing: 16) {
|
VStack(spacing: 16) {
|
||||||
if viewModel.isLoading && viewModel.summary == nil {
|
if viewModel.isLoading && viewModel.summary == nil {
|
||||||
|
|||||||
@ -25,7 +25,7 @@ struct LibraryHomeView: View {
|
|||||||
}
|
}
|
||||||
.accessibilityLabel("导入新知识库")
|
.accessibilityLabel("导入新知识库")
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20).padding(.top, ZXSpacing.statusBarH + 16).padding(.bottom, 12)
|
.padding(.horizontal, 20).padding(.top, 8).padding(.bottom, 12)
|
||||||
HStack(spacing: 8) { Image(systemName: "magnifyingglass").font(.system(size: 16)).foregroundColor(Color.zxF03); TextField("搜索知识库或知识点…", text: $s).font(.system(size: 14)).tint(Color.zxPurple).accessibilityLabel("搜索知识库") }
|
HStack(spacing: 8) { Image(systemName: "magnifyingglass").font(.system(size: 16)).foregroundColor(Color.zxF03); TextField("搜索知识库或知识点…", text: $s).font(.system(size: 14)).tint(Color.zxPurple).accessibilityLabel("搜索知识库") }
|
||||||
.padding(.horizontal, 14).frame(height: 44).background(Color.zxFill004).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)).clipShape(RoundedRectangle(cornerRadius: 14)).padding(.horizontal, 20).padding(.bottom, 16)
|
.padding(.horizontal, 14).frame(height: 44).background(Color.zxFill004).overlay(RoundedRectangle(cornerRadius: 14).stroke(Color.zxBorder008, lineWidth: 1)).clipShape(RoundedRectangle(cornerRadius: 14)).padding(.horizontal, 20).padding(.bottom, 16)
|
||||||
.accessibilityHint("输入关键词搜索知识库或知识点")
|
.accessibilityHint("输入关键词搜索知识库或知识点")
|
||||||
|
|||||||
@ -25,7 +25,7 @@ struct ProfileView: View {
|
|||||||
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1))
|
.overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1))
|
||||||
}
|
}
|
||||||
.accessibilityLabel("设置")
|
.accessibilityLabel("设置")
|
||||||
}.padding(.horizontal, 20).padding(.top, ZXSpacing.statusBarH + 16).padding(.bottom, 4)
|
}.padding(.horizontal, 20).padding(.top, 8).padding(.bottom, 4)
|
||||||
profileCard
|
profileCard
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
NavigationLink(value: Route.goalSetting) {
|
NavigationLink(value: Route.goalSetting) {
|
||||||
|
|||||||
@ -32,7 +32,7 @@ struct StudyHomeView: View {
|
|||||||
.overlay(Capsule().stroke(Color(hex: "#F97316", opacity: 0.2), lineWidth: 1))
|
.overlay(Capsule().stroke(Color(hex: "#F97316", opacity: 0.2), lineWidth: 1))
|
||||||
}
|
}
|
||||||
.padding(.horizontal, 20)
|
.padding(.horizontal, 20)
|
||||||
.padding(.top, ZXSpacing.statusBarH + 16)
|
.padding(.top, 8)
|
||||||
.padding(.bottom, 4)
|
.padding(.bottom, 4)
|
||||||
|
|
||||||
// MARK: - Progress
|
// MARK: - Progress
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user