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