This commit is contained in:
anlicheng 2025-02-21 23:47:55 +08:00
parent 2f69e508fb
commit c6e0fab21d

View File

@ -80,11 +80,13 @@ struct DetailView: View {
@State var detailModel = DetailModel()
var body: some View {
VStack {
VStack(alignment: .leading, spacing: 15) {
VStack(alignment: .center) {
VStack(alignment: .leading, spacing: 20) {
Text(detailModel.name)
.font(.system(size: 20))
.font(.system(size: 30))
.fontWeight(.bold)
HStack(alignment: .center, spacing: 0) {
ForEach(Array(detailModel.voiceActors.enumerated()), id: \.offset) { index, actor in
if index > 0 {
@ -94,9 +96,11 @@ struct DetailView: View {
.font(.system(size: 16))
}
Text("")
Spacer()
}
}
.background(Color.yellow)
HStack {
Spacer()
@ -113,7 +117,7 @@ struct DetailView: View {
}
//
HStack(alignment: .center) {
HStack(alignment: .center, spacing: 15) {
ForEach(Array(detailModel.channels.enumerated()), id: \.offset) { idx, channel in
Text(channel.name)
.font(.system(size: 16))
@ -122,6 +126,7 @@ struct DetailView: View {
detailModel.toggleChannel(channelIdx: idx)
}
}
Spacer()
}
//
@ -134,7 +139,7 @@ struct DetailView: View {
} placeholder: {
ProgressView()
}
.frame(width: 80, height: 80)
.frame(width: 90, height: 70)
.overlay {
Text(episode.numName)
}
@ -142,12 +147,12 @@ struct DetailView: View {
Text(episode.name)
.lineLimit(1)
}
.frame(width: 100, height: 120)
.frame(width: 90, height: 120)
}
}
}
HStack() {
HStack(alignment: .center) {
Button {
print("click me")
} label: {
@ -163,9 +168,14 @@ struct DetailView: View {
}
}
Spacer()
}
.border(Color.red)
.frame(width: 370, alignment: .center)
.task {
await detailModel.loadData(dramaId: 124)
print(UIScreen.main.bounds.width)
}
}