mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 20:48:49 +08:00
round参数配置成0时,会无效
This commit is contained in:
parent
612e7ecccf
commit
52f4f96cca
@ -171,7 +171,7 @@ export const filters: {
|
||||
return 0;
|
||||
}
|
||||
|
||||
decimals = parseInt(decimals, 10) || 2;
|
||||
decimals = parseInt(decimals, 10) ?? 2;
|
||||
|
||||
let multiplier = Math.pow(10, decimals);
|
||||
return (Math.round(input * multiplier) / multiplier).toFixed(decimals);
|
||||
|
Loading…
Reference in New Issue
Block a user