easy3wui 1.5.42 → 1.5.43
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.
|
@@ -490,7 +490,37 @@ var _initialiseProps = function _initialiseProps() {
|
|
|
490
490
|
};
|
|
491
491
|
|
|
492
492
|
this.numeralFormat = function (text) {
|
|
493
|
-
|
|
493
|
+
var strText = text;
|
|
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;
|
|
504
|
+
}
|
|
505
|
+
} else {
|
|
506
|
+
strText = text;
|
|
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
|
+
// }
|
|
523
|
+
return strText;
|
|
494
524
|
};
|
|
495
525
|
|
|
496
526
|
this.rowSelected = function (record) {
|
|
@@ -178,7 +178,8 @@ var BigFileUpload = function (_Component) {
|
|
|
178
178
|
urlDownloadFile = _props.urlDownloadFile,
|
|
179
179
|
initialValue = _props.initialValue,
|
|
180
180
|
propsAFlag = _props.propsAFlag,
|
|
181
|
-
fileViewFlag = _props.fileViewFlag
|
|
181
|
+
fileViewFlag = _props.fileViewFlag,
|
|
182
|
+
maxFileSize = _props.maxFileSize;
|
|
182
183
|
var _state = this.state,
|
|
183
184
|
preUploading = _state.preUploading,
|
|
184
185
|
uploadPercent = _state.uploadPercent,
|
|
@@ -272,6 +273,13 @@ var BigFileUpload = function (_Component) {
|
|
|
272
273
|
});
|
|
273
274
|
return false;
|
|
274
275
|
}
|
|
276
|
+
if (maxFileSize && maxFileSize > 0 && file.size / 1024 / 1024 > maxFileSize) {
|
|
277
|
+
_modal2['default'].error({
|
|
278
|
+
style: { top: '38%' },
|
|
279
|
+
content: '\u9644\u4EF6\u5FC5\u987B\u5C0F\u4E8E' + maxFileSize + 'MB!\''
|
|
280
|
+
});
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
275
283
|
var multiple = _this2.props.multiple;
|
|
276
284
|
var _state3 = _this2.state,
|
|
277
285
|
fileList = _state3.fileList,
|