From 62ca532e5f2259c4e2284f951544dc695f027caa Mon Sep 17 00:00:00 2001 From: ysicing Date: Thu, 24 Sep 2026 17:02:00 +0800 Subject: [PATCH] =?UTF-8?q?fix(widget):=20=E8=8A=82=E5=81=87=E6=97=A5?= =?UTF-8?q?=E4=BB=85=E6=98=BE=E7=A4=BA=E5=85=B7=E4=BD=93=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Widget/CalendarWidget.swift | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Widget/CalendarWidget.swift b/Widget/CalendarWidget.swift index 7678fd9..4cb1127 100644 --- a/Widget/CalendarWidget.swift +++ b/Widget/CalendarWidget.swift @@ -177,7 +177,7 @@ private struct TomorrowWorkWidgetView: View { return switch schedule { case .work: tr("工作日") case .weekend: tr("周末") - case .holiday: tr("节假日") + case .holiday: entry.tomorrow?.holidayName.flatMap { $0.isEmpty ? nil : tr($0) } ?? tr("节假日") case .makeupWork: tr("调休补班") case .makeupDayOff: tr("调休放假") case .dayOff: tr("放假") @@ -201,16 +201,11 @@ private struct TomorrowWorkWidgetView: View { .lineLimit(1) .minimumScaleFactor(0.8) if let scheduleTitle { - VStack(alignment: .leading, spacing: 1) { - Text(scheduleTitle) - if entry.tomorrow?.schedule == .holiday, let holidayName = entry.tomorrow?.holidayName { - Text(tr(holidayName)) - } - } - .font(.caption) - .foregroundStyle(.secondary) - .lineLimit(1) - .minimumScaleFactor(0.75) + Text(scheduleTitle) + .font(.caption) + .foregroundStyle(.secondary) + .lineLimit(1) + .minimumScaleFactor(0.75) } } else { Text(tr("暂无法判断"))