bmc-common-resource 1.1.136 → 1.1.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/amount-decimal-value-constant.d.ts +15 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/enums/amount-decimal-value.num.d.ts +10 -0
- package/dist/enums/index.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/solution/classifyRoomGroupMap.d.ts +1 -1
- package/dist/modules/solution/groupTypes.d.ts +1 -0
- package/dist/utils/common.util.d.ts +12 -2
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AMOUNT_DECIMAL_VALUE_ENUM } from "../enums/amount-decimal-value.num";
|
|
1
2
|
/**
|
|
2
3
|
* 生成UUID v4
|
|
3
4
|
* 使用随机数生成算法,确保生成的UUID唯一
|
|
@@ -79,6 +80,15 @@ export declare function formatChineseMobile(phone: string): string | null;
|
|
|
79
80
|
* 小数处理函数(四舍五入、格式统一)
|
|
80
81
|
* @param {string|number} value - 要处理的值
|
|
81
82
|
* @param {number} decimals - 保留的小数位数,默认0(取整)
|
|
82
|
-
* @
|
|
83
|
+
* @param {boolean} parseNumber - 是否转换为数组,若false则强制补零填充小数位,但返回string
|
|
84
|
+
* @returns {number|string} 处理后的数字或字符串
|
|
83
85
|
*/
|
|
84
|
-
export declare function formatDecimal(value: any, decimals?: number): number;
|
|
86
|
+
export declare function formatDecimal(value: any, decimals?: number, parseNumber?: boolean): string | number;
|
|
87
|
+
/**
|
|
88
|
+
* 根据小数位数保留规则进行小数位处理
|
|
89
|
+
* @param {string|number} value - 要处理的值
|
|
90
|
+
* @param {AMOUNT_DECIMAL_VALUE_ENUM} decimalType - 保留规则code
|
|
91
|
+
* @param {boolean} parseNumber - 是否转换为数组,若false则强制补零填充小数位,但返回string
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
export declare function applyAmountDecimal(value: any, decimalType: AMOUNT_DECIMAL_VALUE_ENUM, parseNumber?: boolean): string | number;
|