easy3wui 1.5.40-beta2 → 1.5.40

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.
@@ -491,21 +491,35 @@ var _initialiseProps = function _initialiseProps() {
491
491
 
492
492
  this.numeralFormat = function (text) {
493
493
  var strText = text;
494
- if (text || text === 0 || isNaN(text)) {
495
- if (typeof text === 'string') {
496
- if (/^\d+(\.\d+)?$/.test(text)) {
497
- strText = (0, _numeral2['default'])(text).format('0,0.00');
498
- } else {
499
- strText = text;
500
- }
501
- } else if (typeof text === 'number') {
502
- if (Number.isInfinite(text) || isNaN(NaN)) {
503
- strText = text;
504
- } else {
505
- strText = (0, _numeral2['default'])(text).format('0,0.00');
506
- }
494
+ if (Number.isFinite(text)) {
495
+ // 有限值数字 用于检查一个数值是否是有限的。如果数值是有限数(即不是 Infinity、-Infinity 或 NaN),那么 Number.isFinite() 返回 true,否则返回 false。
496
+ strText = (0, _numeral2['default'])(text).format('0,0.00');
497
+ } else if (typeof text === 'string') {
498
+ // 字符串
499
+ if (/^\d+(\.\d+)?$/.test(text)) {
500
+ // 数字字符串
501
+ strText = (0, _numeral2['default'])(text).format('0,0.00');
502
+ } else {
503
+ strText = text;
507
504
  }
505
+ } else {
506
+ strText = text;
508
507
  }
508
+ // if (text || text === 0 || isNaN(text)) {
509
+ // if (typeof text === 'string') {
510
+ // if (/^\d+(\.\d+)?$/.test(text)) {
511
+ // strText = numeral(text).format('0,0.00');
512
+ // } else {
513
+ // strText = text;
514
+ // }
515
+ // } else if (typeof text === 'number') {
516
+ // if (Number.isInfinite(text) || isNaN(NaN)) {
517
+ // strText = text;
518
+ // } else {
519
+ // strText = numeral(text).format('0,0.00');
520
+ // }
521
+ // }
522
+ // }
509
523
  return strText;
510
524
  };
511
525
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy3wui",
3
- "version": "1.5.40-beta2",
3
+ "version": "1.5.40",
4
4
  "description": "easy3wui components for react",
5
5
  "keywords": [
6
6
  "react",