From b7387e02c4115fff674208a64c06d07ad4cdd567 Mon Sep 17 00:00:00 2001 From: cat_shark <1716967236@qq.com> Date: Sun, 5 Jul 2026 10:12:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=95=AA=E8=8C=84=E9=92=9F)=EF=BC=9A?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E7=8E=AF=E4=B8=8E=E5=80=92=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=E6=96=B9=E5=90=91=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 9c2c1b7 错误地将 progress 改为 (total-current)/total, 导致数字递减但进度环递增(从空到满)。实际 runCountdown 中 timerMinutes/timerSeconds 存储的是剩余时间,应直接用 remaining/total 使环从 100%→0% 递减。 --- src/components/StartTask.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/StartTask.vue b/src/components/StartTask.vue index 0738de7..8720662 100644 --- a/src/components/StartTask.vue +++ b/src/components/StartTask.vue @@ -81,8 +81,8 @@ const breakAudio = new Audio('/resource/notification.mp3'); const progress = computed(() => { const total = isBreak.value ? 5 * 60 : 25 * 60; - const current = timerMinutes.value * 60 + timerSeconds.value; - return ((total - current) / total) * 100; + const remaining = timerMinutes.value * 60 + timerSeconds.value; + return (remaining / total) * 100; }); const nowTimestamp = ref(Date.now());