fix view
This commit is contained in:
parent
efe9de8b5e
commit
436b4c1256
@ -72,7 +72,7 @@ struct DateNavView: View {
|
|||||||
ScrollView(.vertical, showsIndicators: false) {
|
ScrollView(.vertical, showsIndicators: false) {
|
||||||
VStack(alignment: .center) {
|
VStack(alignment: .center) {
|
||||||
ForEach(navModel.dateModels) { model in
|
ForEach(navModel.dateModels) { model in
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 15) {
|
||||||
Text(model.year)
|
Text(model.year)
|
||||||
HStack {
|
HStack {
|
||||||
ForEach(model.months, id: \.id) { month in
|
ForEach(model.months, id: \.id) { month in
|
||||||
@ -91,8 +91,11 @@ struct DateNavView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.padding(15)
|
||||||
|
.frame(height: 600)
|
||||||
.task {
|
.task {
|
||||||
await self.navModel.loadDateCells(userId: self.userId)
|
await self.navModel.loadDateCells(userId: self.userId)
|
||||||
|
print(UIScreen.main.bounds.height)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,15 +113,15 @@ extension DateNavView {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.frame(width: 80, height: 50)
|
.frame(width: 80, height: 40)
|
||||||
.foregroundColor(selected ? Color.black : Color.white)
|
.foregroundColor(selected ? Color.black : Color.white)
|
||||||
.cornerRadius(10)
|
.cornerRadius(8)
|
||||||
.overlay {
|
.overlay {
|
||||||
RoundedRectangle(cornerRadius: 10)
|
RoundedRectangle(cornerRadius: 8)
|
||||||
.stroke(Color.black, lineWidth: 1)
|
.stroke(Color.black, lineWidth: 1)
|
||||||
Text(datetime)
|
Text(datetime)
|
||||||
.foregroundColor(selected ? Color.white : Color.black)
|
.foregroundColor(selected ? Color.white : Color.black)
|
||||||
.font(.system(size: 20, weight: .regular))
|
.font(.system(size: 18, weight: .regular))
|
||||||
|
|
||||||
}
|
}
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
@ -138,15 +141,15 @@ extension DateNavView {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.frame(width: 80, height: 50)
|
.frame(width: 80, height: 40)
|
||||||
.foregroundColor(Color.white)
|
.foregroundColor(.white)
|
||||||
.cornerRadius(10)
|
.cornerRadius(8)
|
||||||
.overlay {
|
.overlay {
|
||||||
RoundedRectangle(cornerRadius: 10)
|
RoundedRectangle(cornerRadius: 8)
|
||||||
.stroke(style: StrokeStyle(lineWidth: 1, dash: [4]))
|
.stroke(Color(hex: "#d7d7d7"), style: StrokeStyle(lineWidth: 1, dash: [4]))
|
||||||
Text(datetime)
|
Text(datetime)
|
||||||
.foregroundColor(Color.yellow)
|
.foregroundColor(Color(hex: "#d7d7d7"))
|
||||||
.font(.system(size: 20, weight: .regular))
|
.font(.system(size: 18, weight: .regular))
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -154,7 +157,7 @@ extension DateNavView {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
//#Preview {
|
//#Preview {
|
||||||
// DateNavView()
|
// DateNavView()
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -365,6 +365,7 @@ extension IndexView {
|
|||||||
}
|
}
|
||||||
.task {
|
.task {
|
||||||
await self.indexModel.loadData(userId: self.userId)
|
await self.indexModel.loadData(userId: self.userId)
|
||||||
|
print(UIScreen.main.bounds.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user