cloud-b2b 1.1.31 → 1.1.32

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.
@@ -66,6 +66,8 @@ var parseNumber = function parseNumber(value, _ref) {
66
66
  precision = Number(precision);
67
67
  if (precision) {
68
68
  value = value.toFixed(precision);
69
+ value = value.toString(); // 将数值转换为字符串
70
+ value = value.replace(/(\.\d*?[1-9])0+$|\.0*$/, "$1"); // 去除小数点后无意义的零
69
71
  if (!fixed) {
70
72
  value = Number(value);
71
73
  }
@@ -74,6 +74,8 @@ var parseNumber = function parseNumber(value, _ref) {
74
74
  precision = Number(precision);
75
75
  if (precision) {
76
76
  value = value.toFixed(precision);
77
+ value = value.toString(); // 将数值转换为字符串
78
+ value = value.replace(/(\.\d*?[1-9])0+$|\.0*$/, "$1"); // 去除小数点后无意义的零
77
79
  if (!fixed) {
78
80
  value = Number(value);
79
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloud-b2b",
3
- "version": "1.1.31",
3
+ "version": "1.1.32",
4
4
  "description": "A react component library dependent antd",
5
5
  "keywords": [
6
6
  "react",