fix(番茄钟):进度环与倒计时方向一致

commit 9c2c1b7 错误地将 progress 改为 (total-current)/total,
导致数字递减但进度环递增(从空到满)。实际 runCountdown
中 timerMinutes/timerSeconds 存储的是剩余时间,应直接用
remaining/total 使环从 100%→0% 递减。
This commit is contained in:
2026-07-05 10:12:52 +08:00
parent 5986b3996b
commit b7387e02c4
+2 -2
View File
@@ -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());