@bchr/bchr-front-lib 0.5.7 → 0.5.9
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.
|
@@ -479,13 +479,19 @@ var buildActionButton = function buildActionButton(props, subActionButton, inner
|
|
|
479
479
|
};
|
|
480
480
|
|
|
481
481
|
buttonProps.onClick = function () {
|
|
482
|
-
if (_utils.Values.isBlankString(checkField) || _utils.Values.
|
|
482
|
+
if (_utils.Values.isBlankString(checkField) || _utils.Values.isNull(checkData)) {
|
|
483
483
|
throw new Error("Please enter the check field and table data before transmitting the check field and table data");
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
+
if (_utils.Values.isEmptyArray(checkData)) {
|
|
487
|
+
_antd.message.warning('未找到选中的记录,请检查选中状态');
|
|
488
|
+
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
|
|
486
492
|
var checkedNames = [];
|
|
487
493
|
|
|
488
|
-
if (_utils.Values.
|
|
494
|
+
if (_utils.Values.isNotBlankString(checkField) && _utils.Values.isNotEmptyArray(checkData)) {
|
|
489
495
|
if (Array.isArray(checkData)) {
|
|
490
496
|
var selectedData = checkData.filter(function (item) {
|
|
491
497
|
return item.selected;
|
package/package.json
CHANGED
|
@@ -400,12 +400,17 @@ const buildActionButton = function(props, subActionButton, innerLine) {
|
|
|
400
400
|
okButtonProps : {type: buttonProps.type, theme : "solid", icon: <CheckOutlined />}
|
|
401
401
|
};
|
|
402
402
|
buttonProps.onClick = function() {
|
|
403
|
-
if (Values.isBlankString(checkField) || Values.
|
|
403
|
+
if (Values.isBlankString(checkField) || Values.isNull(checkData)) {
|
|
404
404
|
throw new Error("Please enter the check field and table data before transmitting the check field and table data");
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
if (Values.isEmptyArray(checkData)) {
|
|
408
|
+
message.warning('未找到选中的记录,请检查选中状态');
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
|
|
407
412
|
let checkedNames = [];
|
|
408
|
-
if (Values.
|
|
413
|
+
if (Values.isNotBlankString(checkField) && Values.isNotEmptyArray(checkData)) {
|
|
409
414
|
if (Array.isArray(checkData)) {
|
|
410
415
|
let selectedData = checkData.filter(item => item.selected);
|
|
411
416
|
if (Values.isNotEmptyArray(selectedData)) {
|
|
@@ -415,13 +420,14 @@ const buildActionButton = function(props, subActionButton, innerLine) {
|
|
|
415
420
|
}
|
|
416
421
|
else {
|
|
417
422
|
message.warning('未找到选中的记录,请检查选中状态');
|
|
418
|
-
return
|
|
423
|
+
return;
|
|
419
424
|
}
|
|
420
425
|
}
|
|
421
426
|
else if (lodash.isPlainObject(checkData)) {
|
|
422
427
|
checkedNames.push(checkData[checkField]);
|
|
423
428
|
}
|
|
424
429
|
}
|
|
430
|
+
|
|
425
431
|
modalOptions.content = modalOptions.content.replace('[options]', checkedNames.join(','));
|
|
426
432
|
|
|
427
433
|
if (confirmType) {
|