fix index view
This commit is contained in:
parent
3713d30daa
commit
5ff82b10bb
@ -13,11 +13,16 @@ import Observation
|
||||
final class IndexModel {
|
||||
|
||||
struct DramaItem: Codable {
|
||||
struct Episode: Codable {
|
||||
let id: Int32
|
||||
struct Episode: Codable, Identifiable {
|
||||
let id = UUID().uuidString
|
||||
let name: String
|
||||
let thumb: String
|
||||
let num_name: String
|
||||
let play: String
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case name, thumb, num_name, play
|
||||
}
|
||||
}
|
||||
|
||||
let id: Int32
|
||||
@ -260,7 +265,7 @@ extension IndexView {
|
||||
|
||||
ScrollView(.horizontal, showsIndicators: false) {
|
||||
HStack(alignment: .center, spacing: 5) {
|
||||
ForEach(dramaItem.episodes, id: \.id) { item in
|
||||
ForEach(dramaItem.episodes) { item in
|
||||
VStack(alignment: .center) {
|
||||
GeometryReader { geometry in
|
||||
AsyncImage(url: URL(string: item.thumb)) { image in
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user