mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
Merge remote-tracking branch 'baidu/master'
This commit is contained in:
commit
20642c6fca
@ -54,7 +54,7 @@ export function formatDuration(value: number): string {
|
|||||||
|
|
||||||
while (len--) {
|
while (len--) {
|
||||||
if (steps[len] && value >= steps[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];
|
value %= steps[len];
|
||||||
} else if (len === 0 && value) {
|
} else if (len === 0 && value) {
|
||||||
parts.push((value.toFixed ? value.toFixed(2) : '0') + unit[0]);
|
parts.push((value.toFixed ? value.toFixed(2) : '0') + unit[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user