This commit is contained in:
2024-01-16 22:55:44 +08:00
commit b4f90a9019
36 changed files with 1282 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
//
// ExploreView.swift
// jason
//
// Created by Jason on 2024/1/16.
//
import SwiftUI
struct ExploreView: View {
var body: some View {
ScrollView {
VStack (alignment: .leading) {
UserCardComponent()
Text("item")
}
}
.background(Color.green)
}
}
#Preview {
ExploreView()
}

View File

@@ -0,0 +1,24 @@
//
// ContentView.swift
// jason
//
// Created by Jason on 2024/1/16.
//
import SwiftUI
import SwiftData
struct HomeView: View {
var body: some View {
ScrollView{
VStack(alignment: .leading, content: {
UserCardComponent()
})
}
.background(Color.orange)
}
}
#Preview {
HomeView()
}

View File

@@ -0,0 +1,38 @@
//
// TabbarView.swift
// jason
//
// Created by Jason on 2024/1/16.
//
import SwiftUI
struct TabbarView: View {
var body: some View {
TabView() {
HomeView()
.tabItem {
Image(systemName: "house")
Text("Home")
}
.tag(1)
ExploreView()
.tabItem {
Image(systemName: "magnifyingglass")
Text("Explore")
}
.tag(2)
UserView()
.tabItem {
Image(systemName: "person")
Text("User")
}
.tag(3)
}
.background(Color.white)
}
}
#Preview {
TabbarView()
}

View File

@@ -0,0 +1,24 @@
//
// UserView.swift
// jason
//
// Created by Jason on 2024/1/16.
//
import SwiftUI
struct UserView: View {
var body: some View {
ScrollView {
VStack (alignment: .leading) {
UserCardComponent()
Text("item")
}
}
.background(Color.red)
}
}
#Preview {
UserView()
}