This commit is contained in:
2022-12-12 15:48:55 +08:00
parent 61c20fc6b6
commit 1475322d91
4 changed files with 41 additions and 35 deletions

View File

@@ -81,11 +81,13 @@ const formatMoney = function (s: string) {
t += l[i] + ""; //加上空格
}
}
let z:any = (noNegative ? "" : "-") + t.split("").reverse().join("")
z = isNaN(z) ? 0 : z
if(r){
return (noNegative ? "" : "-") + t.split("").reverse().join("") + "." + r;
return z+ "." + r;
}else{
return (noNegative ? "" : "-") + t.split("").reverse().join("")
return z
}
}