ztxkui 3.9.6 → 3.9.8
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.
|
@@ -109,9 +109,7 @@ function BasicDemo() {
|
|
|
109
109
|
React.createElement(InputNumber, { value: value, onChange: function (value) {
|
|
110
110
|
console.log(value, 1);
|
|
111
111
|
setValue(value);
|
|
112
|
-
},
|
|
113
|
-
// precision={3}
|
|
114
|
-
formatterType: "currency", style: { width: '300px' } }),
|
|
112
|
+
}, precision: 3, formatterType: "currency", style: { width: '300px' } }),
|
|
115
113
|
React.createElement(InputNumber, { value: value1, onChange: function (value) {
|
|
116
114
|
console.log(value, 1);
|
|
117
115
|
setValue1(value);
|
|
@@ -398,7 +398,7 @@ function EnhanceSelect(_a) {
|
|
|
398
398
|
getRemoteDataHandle(value, '');
|
|
399
399
|
// }
|
|
400
400
|
};
|
|
401
|
-
var onSearchHandle = debounce(searchHandle,
|
|
401
|
+
var onSearchHandle = debounce(searchHandle, 500);
|
|
402
402
|
var onSearchHandleInner = function (value) {
|
|
403
403
|
var _a;
|
|
404
404
|
// console.log(value);
|
|
@@ -395,11 +395,15 @@ var Sinatures = function (_a) {
|
|
|
395
395
|
React.createElement(Button, { type: "link" }, "\u6DFB\u52A0\u9644\u4EF6")))),
|
|
396
396
|
isUpload && (React.createElement(Button, { type: "link", onClick: function () {
|
|
397
397
|
setIsOnlyQj(true);
|
|
398
|
-
|
|
398
|
+
var onlyQjRecords = [
|
|
399
399
|
{
|
|
400
400
|
attachId: '123456789',
|
|
401
401
|
},
|
|
402
|
-
]
|
|
402
|
+
];
|
|
403
|
+
if (onSigValuesChange) {
|
|
404
|
+
onSigValuesChange(sigValuesChange('fileList', onlyQjRecords));
|
|
405
|
+
}
|
|
406
|
+
setRecords(onlyQjRecords);
|
|
403
407
|
} }, "\u4EC5\u9700\u8981\u7FA4\u6770\u5370\u7AE0"))));
|
|
404
408
|
},
|
|
405
409
|
key: 'attachId',
|
|
@@ -423,10 +427,16 @@ var Sinatures = function (_a) {
|
|
|
423
427
|
if (xhr.status === 200) {
|
|
424
428
|
setTbLoading(false);
|
|
425
429
|
if ((response === null || response === void 0 ? void 0 : response.success) === true) {
|
|
426
|
-
|
|
427
|
-
var newRecords =
|
|
430
|
+
var getNewRecord_1 = function (data) {
|
|
431
|
+
var newRecords = data.slice();
|
|
428
432
|
newRecords.splice(index, 1);
|
|
429
433
|
return newRecords;
|
|
434
|
+
};
|
|
435
|
+
if (records.length > 0 && onSigValuesChange) {
|
|
436
|
+
onSigValuesChange(sigValuesChange('fileList', getNewRecord_1(records)));
|
|
437
|
+
}
|
|
438
|
+
setRecords(function (preRecords) {
|
|
439
|
+
return getNewRecord_1(preRecords);
|
|
430
440
|
});
|
|
431
441
|
message.success('文件删除成功!');
|
|
432
442
|
}
|
|
@@ -687,13 +697,19 @@ var Sinatures = function (_a) {
|
|
|
687
697
|
});
|
|
688
698
|
console.log(successFileList_1);
|
|
689
699
|
setRecords(function (preRecords) {
|
|
690
|
-
|
|
700
|
+
var _records = __spreadArray(__spreadArray([], preRecords), successFileList_1).filter(function (item) { return item.attachId !== '123456789'; });
|
|
701
|
+
if (onSigValuesChange) {
|
|
702
|
+
onSigValuesChange(sigValuesChange('fileList', _records));
|
|
703
|
+
}
|
|
704
|
+
return _records;
|
|
691
705
|
});
|
|
692
706
|
}
|
|
693
707
|
if (filelist.every(function (item) { return item.status === 'error'; })) {
|
|
694
708
|
message.error('文件上传失败!');
|
|
695
709
|
}
|
|
696
|
-
},
|
|
710
|
+
},
|
|
711
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
712
|
+
[setRecords]);
|
|
697
713
|
/** 群杰印章修改 */
|
|
698
714
|
function qunjSealChangeHandle(value) {
|
|
699
715
|
qunjSealChange && qunjSealChange(value);
|
|
@@ -92,16 +92,19 @@ function formatCurrency(n) {
|
|
|
92
92
|
return n;
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
function getValue(value, isFocusRef, precision) {
|
|
96
|
+
if (value && !isNaN(Number(value)) && !isFocusRef.current && precision) {
|
|
97
|
+
return exactRound(value, precision);
|
|
98
|
+
}
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
95
101
|
export function getFormatter(formatterType, currencySymbol, isFocusRef, precision) {
|
|
96
102
|
if (currencySymbol === void 0) { currencySymbol = '$'; }
|
|
97
103
|
if (formatterType === 'currency') {
|
|
98
104
|
// let formatterFn: IFormatterFuc = (value) =>
|
|
99
105
|
// `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
|
100
106
|
var formatterFn = function (v) {
|
|
101
|
-
var value = v;
|
|
102
|
-
if (value && !isFocusRef.current && precision) {
|
|
103
|
-
value = exactRound(value, precision);
|
|
104
|
-
}
|
|
107
|
+
var value = getValue(v, isFocusRef, precision);
|
|
105
108
|
return formatCurrency(value);
|
|
106
109
|
};
|
|
107
110
|
var parserFn = function (value) { return value.replace(/(,*)/g, ''); };
|
|
@@ -113,10 +116,7 @@ export function getFormatter(formatterType, currencySymbol, isFocusRef, precisio
|
|
|
113
116
|
}
|
|
114
117
|
if (formatterType === 'percent') {
|
|
115
118
|
var formatterFn = function (v) {
|
|
116
|
-
var value = v;
|
|
117
|
-
if (value && !isFocusRef.current && precision) {
|
|
118
|
-
value = exactRound(value, precision);
|
|
119
|
-
}
|
|
119
|
+
var value = getValue(v, isFocusRef, precision);
|
|
120
120
|
return value + "%";
|
|
121
121
|
};
|
|
122
122
|
var parserFn = function (value) {
|
|
@@ -130,10 +130,7 @@ export function getFormatter(formatterType, currencySymbol, isFocusRef, precisio
|
|
|
130
130
|
}
|
|
131
131
|
if (formatterType === 'thousands') {
|
|
132
132
|
var formatterFn = function (v) {
|
|
133
|
-
var value = v;
|
|
134
|
-
if (value && !isFocusRef.current && precision) {
|
|
135
|
-
value = exactRound(value, precision);
|
|
136
|
-
}
|
|
133
|
+
var value = getValue(v, isFocusRef, precision);
|
|
137
134
|
return value + "\u2030";
|
|
138
135
|
};
|
|
139
136
|
var parserFn = function (value) {
|
|
@@ -147,10 +144,7 @@ export function getFormatter(formatterType, currencySymbol, isFocusRef, precisio
|
|
|
147
144
|
}
|
|
148
145
|
return {
|
|
149
146
|
formatter: function (value) {
|
|
150
|
-
|
|
151
|
-
return exactRound(value, precision);
|
|
152
|
-
}
|
|
153
|
-
return value;
|
|
147
|
+
return getValue(value, isFocusRef, precision);
|
|
154
148
|
},
|
|
155
149
|
parser: function (value) { return value; },
|
|
156
150
|
precision: precision,
|