diff --git a/LearnEnglish/LearnEnglish/Views/QuizView.swift b/LearnEnglish/LearnEnglish/Views/QuizView.swift index bf1eb1b..8ec2455 100644 --- a/LearnEnglish/LearnEnglish/Views/QuizView.swift +++ b/LearnEnglish/LearnEnglish/Views/QuizView.swift @@ -72,10 +72,17 @@ struct QuizView: View { Button { select(option, for: question) } label: { - Text(option) - .font(.headline) - .frame(maxWidth: .infinity) - .padding(.vertical, 14) + VStack(spacing: 4) { + Text(option) + .font(.headline) + if config.mode == .zhToEn, let w = config.words.first(where: { $0.word == option }) { + Text(w.phonetic) + .font(.caption) + .foregroundStyle(.secondary) + } + } + .frame(maxWidth: .infinity) + .padding(.vertical, 10) } .buttonStyle(.bordered) .tint(optionColor(option, for: question)) @@ -88,11 +95,6 @@ struct QuizView: View { Text(selectedOption == question.answer ? "回答正确" : "正确答案:\(question.answer)") .font(.headline) .foregroundStyle(selectedOption == question.answer ? .green : .red) - if config.mode == .zhToEn, selectedOption != nil { - Text(question.word.phonetic) - .font(.subheadline) - .foregroundStyle(.secondary) - } Button(currentIndex + 1 < questions.count ? "下一题" : "查看成绩") { next() }