页面uodate

This commit is contained in:
2024-01-26 17:52:25 +08:00
parent 6f7f8deda1
commit fdc1b1c18f
10 changed files with 161 additions and 46 deletions

View File

@@ -12,23 +12,19 @@ struct TabBarView: View {
var body: some View {
NavigationView {
ZStack(alignment: .leading) {
ZStack {
Group {
switch selectedTab {
case .home:
HomeView()
case .explore:
MallView()
case .message:
MessageView()
case .cart:
CartView()
case .account:
UserView()
}
}
// .offset(y: -64)
// .safeAreaInset(edge: .top) {
// Color.clear.frame(height: 32)
// }
HStack {
ForEach(tabItems) { item in
@@ -49,14 +45,11 @@ struct TabBarView: View {
.shadow(color: selectedTab == item.tab ? Color.orange : Color.blue, radius: 15)
}
}
.padding(.top, 12.0)
.padding(.bottom, 32)
.padding(.vertical, 12.0)
.background(Color("TabBarColor"))
.frame(maxHeight: .infinity, alignment: .bottom)
.shadow(color: Color.gray.opacity(0.5), radius: 6, x: 0, y: 6)
.ignoresSafeArea()
}
.statusBarHidden(false)
}
.navigationViewStyle(.columns)
}