fix
This commit is contained in:
parent
2f69e508fb
commit
c6e0fab21d
@ -80,11 +80,13 @@ struct DetailView: View {
|
|||||||
@State var detailModel = DetailModel()
|
@State var detailModel = DetailModel()
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack(alignment: .center) {
|
||||||
VStack(alignment: .leading, spacing: 15) {
|
|
||||||
|
VStack(alignment: .leading, spacing: 20) {
|
||||||
Text(detailModel.name)
|
Text(detailModel.name)
|
||||||
.font(.system(size: 20))
|
.font(.system(size: 30))
|
||||||
.fontWeight(.bold)
|
.fontWeight(.bold)
|
||||||
|
|
||||||
HStack(alignment: .center, spacing: 0) {
|
HStack(alignment: .center, spacing: 0) {
|
||||||
ForEach(Array(detailModel.voiceActors.enumerated()), id: \.offset) { index, actor in
|
ForEach(Array(detailModel.voiceActors.enumerated()), id: \.offset) { index, actor in
|
||||||
if index > 0 {
|
if index > 0 {
|
||||||
@ -94,8 +96,10 @@ struct DetailView: View {
|
|||||||
.font(.system(size: 16))
|
.font(.system(size: 16))
|
||||||
}
|
}
|
||||||
Text("等")
|
Text("等")
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.background(Color.yellow)
|
||||||
|
|
||||||
HStack {
|
HStack {
|
||||||
Spacer()
|
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
|
ForEach(Array(detailModel.channels.enumerated()), id: \.offset) { idx, channel in
|
||||||
Text(channel.name)
|
Text(channel.name)
|
||||||
.font(.system(size: 16))
|
.font(.system(size: 16))
|
||||||
@ -122,6 +126,7 @@ struct DetailView: View {
|
|||||||
detailModel.toggleChannel(channelIdx: idx)
|
detailModel.toggleChannel(channelIdx: idx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 渠道相关的数据列表
|
// 渠道相关的数据列表
|
||||||
@ -134,7 +139,7 @@ struct DetailView: View {
|
|||||||
} placeholder: {
|
} placeholder: {
|
||||||
ProgressView()
|
ProgressView()
|
||||||
}
|
}
|
||||||
.frame(width: 80, height: 80)
|
.frame(width: 90, height: 70)
|
||||||
.overlay {
|
.overlay {
|
||||||
Text(episode.numName)
|
Text(episode.numName)
|
||||||
}
|
}
|
||||||
@ -142,12 +147,12 @@ struct DetailView: View {
|
|||||||
Text(episode.name)
|
Text(episode.name)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
.frame(width: 100, height: 120)
|
.frame(width: 90, height: 120)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HStack() {
|
HStack(alignment: .center) {
|
||||||
Button {
|
Button {
|
||||||
print("click me")
|
print("click me")
|
||||||
} label: {
|
} label: {
|
||||||
@ -163,9 +168,14 @@ struct DetailView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
}
|
}
|
||||||
|
.border(Color.red)
|
||||||
|
.frame(width: 370, alignment: .center)
|
||||||
.task {
|
.task {
|
||||||
await detailModel.loadData(dramaId: 124)
|
await detailModel.loadData(dramaId: 124)
|
||||||
|
print(UIScreen.main.bounds.width)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user