fix:修改问题

1 panel图表报错 toFixed is not a function
This commit is contained in:
hyx
2020-05-12 17:03:30 +08:00
parent 3382732aff
commit e332e8c78b

View File

@@ -317,7 +317,7 @@ function timeCompute(value,unit,dot=0){
}
let quotient = time / minUnit.ascii;
if(quotient < 1){
return `${time.toFixed(dot)} ${minUnit.unit}`;
return `${Number(time).toFixed(dot)} ${minUnit.unit}`;
}else{
minUnit = units[++i];
return result(quotient,minUnit);