hotfix/2.9.9.2312.01

This commit is contained in:
黎永顺 2023-12-01 17:56:16 +08:00
parent 04ab495c25
commit 07c6ca839f
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ export const padding0 = (num, length) => {
};
export const toDecimal_n = (x, num) => {
if (isNaN(parseFloat(x))) return false;
let f = Math.round(x * 100) / 100;
let f = Math.round(x * Math.pow(10, num)) / Math.pow(10, num);
let s = f.toString();
let rs = s.indexOf(".");
if (rs < 0) {