@@ -95,10 +95,15 @@ struct QuizView: View {
|
|||||||
Text(selectedOption == question.answer ? "回答正确" : "正确答案:\(question.answer)")
|
Text(selectedOption == question.answer ? "回答正确" : "正确答案:\(question.answer)")
|
||||||
.font(.headline)
|
.font(.headline)
|
||||||
.foregroundStyle(selectedOption == question.answer ? .green : .red)
|
.foregroundStyle(selectedOption == question.answer ? .green : .red)
|
||||||
Button(currentIndex + 1 < questions.count ? "下一题" : "查看成绩") {
|
Button {
|
||||||
next()
|
next()
|
||||||
|
} label: {
|
||||||
|
Text(currentIndex + 1 < questions.count ? "下一题" : "查看成绩")
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 44)
|
||||||
}
|
}
|
||||||
.buttonStyle(.borderedProminent)
|
.buttonStyle(.borderedProminent)
|
||||||
|
.font(.headline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user