bmc-common-resource 1.1.120 → 1.1.122

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.
@@ -14,12 +14,15 @@ export declare function generateRandomId(length?: number): string;
14
14
  * 格式化数字为千分位显示。
15
15
  *
16
16
  * 此函数将传入的值格式化为带有千分位分隔符的字符串。如果传入值无效(例如 null、空字符串、非数字字符串),则返回默认值 `"0"`。
17
+ * 保持原有的小数位数,不会因为数值转换而丢失末尾的零。
17
18
  *
18
19
  * @param {number|string|null|undefined} value - 需要格式化的值,可以是数字、数字字符串、null 或 undefined。如果为无效值,则返回默认值 "0"。
19
20
  * @returns {string} 格式化后的千分位数字字符串。如果输入无效,返回 `"0"`。
20
21
  *
21
22
  * @example
22
23
  * formatNumberWithCommas(1234567.89); // 返回 "1,234,567.89"
24
+ * formatNumberWithCommas('123.10'); // 返回 "123.10"
25
+ * formatNumberWithCommas('123.100'); // 返回 "123.100"
23
26
  * formatNumberWithCommas(null); // 返回 "0"
24
27
  * formatNumberWithCommas(''); // 返回 "0"
25
28
  * formatNumberWithCommas('1234567.89'); // 返回 "1,234,567.89"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bmc-common-resource",
3
- "version": "1.1.120",
3
+ "version": "1.1.122",
4
4
  "description": "通用枚举、常量和资源的npm包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",