From f0b5bb2f5c3ccf5d0462b67512ed24317bc7ee48 Mon Sep 17 00:00:00 2001 From: catchonme Date: Wed, 19 Feb 2020 17:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=B6=E9=97=B4=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tpl-builtin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/tpl-builtin.ts b/src/utils/tpl-builtin.ts index 4c56a70ce..801c6d18e 100644 --- a/src/utils/tpl-builtin.ts +++ b/src/utils/tpl-builtin.ts @@ -54,7 +54,7 @@ export function formatDuration(value: number): string { while (len--) { if (steps[len] && value >= steps[len]) { - parts.push(Math.round(value / steps[len]) + unit[len]); + parts.push(Math.floor(value / steps[len]) + unit[len]); value %= steps[len]; } else if (len === 0 && value) { parts.push((value.toFixed ? value.toFixed(2) : '0') + unit[0]);