fix view
This commit is contained in:
parent
a16a416642
commit
a50a4dc4f0
@ -72,10 +72,12 @@ final class IndexModel {
|
|||||||
|
|
||||||
var dramas: [DramaItem]
|
var dramas: [DramaItem]
|
||||||
var showUpdateDramas: [UpdateDramaShowItem]
|
var showUpdateDramas: [UpdateDramaShowItem]
|
||||||
|
var selectedDate: String
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
self.dramas = []
|
self.dramas = []
|
||||||
self.showUpdateDramas = []
|
self.showUpdateDramas = []
|
||||||
|
self.selectedDate = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
@ -156,6 +158,7 @@ struct IndexView: View {
|
|||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
selectGroupId = group.groupId
|
selectGroupId = group.groupId
|
||||||
print("current group_id: \(self.selectGroupId)")
|
print("current group_id: \(self.selectGroupId)")
|
||||||
|
indexModel.selectedDate = group.groupId
|
||||||
showDateNavPopover = true
|
showDateNavPopover = true
|
||||||
}
|
}
|
||||||
case .item(let item):
|
case .item(let item):
|
||||||
@ -180,6 +183,9 @@ struct IndexView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onChange(of: indexModel.selectedDate) { oldValue, newValue in
|
||||||
|
print("old date: \(oldValue), new value: \(newValue)")
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle()
|
Rectangle()
|
||||||
.frame(height: 0)
|
.frame(height: 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user