修复时间转换问题

This commit is contained in:
catchonme 2020-02-19 17:19:36 +08:00
parent 035b914a4f
commit de4433fbc2

View File

@ -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]);