This commit is contained in:
anlicheng 2025-02-22 01:16:51 +08:00
parent 3550a5fc38
commit 8d2d972ac6

View File

@ -176,7 +176,7 @@ struct IndexView: View {
} placeholder: { } placeholder: {
ProgressView() ProgressView()
} }
.frame(width: .infinity, height: 180) .frame(width: 370, height: 180)
.overlay { .overlay {
HStack { HStack {
VStack(alignment: .leading, spacing: 10) { VStack(alignment: .leading, spacing: 10) {
@ -268,26 +268,27 @@ extension IndexView {
} }
ScrollView(.horizontal, showsIndicators: false) { ScrollView(.horizontal, showsIndicators: false) {
HStack(alignment: .center, spacing: 10) { HStack(alignment: .center, spacing: 5) {
ForEach(dramaItem.episodes, id: \.id) { item in ForEach(dramaItem.episodes, id: \.id) { item in
VStack(alignment: .center) { VStack(alignment: .center) {
AsyncImage(url: URL(string: item.thumb)) { image in GeometryReader { geometry in
image.resizable() AsyncImage(url: URL(string: item.thumb)) { image in
} placeholder: { image.resizable()
ProgressView() } placeholder: {
} ProgressView()
.frame(width: 80, height: 80) }
.overlay { .frame(width: geometry.frame(in: .local).width, height: 80)
Text(item.numName) .overlay {
Text(item.numName)
}
} }
Text(item.name) Text(item.name)
.lineLimit(1) .lineLimit(1)
} }
.frame(width: 100, height: 120) .frame(width: 120, height: 120)
} }
} }
.border(Color.red)
} }
} }
} }