|
@@ -232,6 +232,9 @@ export const numberToFixed = function (val, num) {
|
|
|
|
|
|
return _value
|
|
|
}
|
|
|
+export const toFixedDecimal = function (num, decimal) {
|
|
|
+ return parseFloat(num).toFixed(decimal)
|
|
|
+}
|
|
|
// 保留decimal位小数(不四舍五入) num 数值,decimal要保留的小数位数
|
|
|
export const formatDecimal = function (num, decimal) {
|
|
|
num = num.toString()
|