From d09edd395ce0d4d1194aa2f4001f4d97c260967b Mon Sep 17 00:00:00 2001 From: fish Date: Sat, 18 Jul 2026 21:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=89=E9=80=89=E8=8B=B1=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=86=85=E5=B1=95=E7=A4=BA=E9=9F=B3=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- .../LearnEnglish/Views/QuizView.swift | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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() }