@lemon-fe/kits 1.2.12-alpha.1 → 1.2.12
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.
|
@@ -37,7 +37,9 @@ interface Props<RecordType extends Record<string, any> = Record<string, any>, Re
|
|
|
37
37
|
/**
|
|
38
38
|
* @description modal footer 默认为null
|
|
39
39
|
*/
|
|
40
|
-
footer?: ReactNode | ((record: RecordType[]
|
|
40
|
+
footer?: ReactNode | ((record: RecordType[], others: {
|
|
41
|
+
results: Map<Key, Result<ResultType>>;
|
|
42
|
+
}) => ReactNode);
|
|
41
43
|
/**
|
|
42
44
|
* @description 关闭时触发
|
|
43
45
|
* @param success 成功的结果
|
|
@@ -592,6 +592,21 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
592
592
|
});
|
|
593
593
|
return cols;
|
|
594
594
|
}
|
|
595
|
+
}, {
|
|
596
|
+
key: "getError",
|
|
597
|
+
value: function getError() {
|
|
598
|
+
var res = new Map();
|
|
599
|
+
_toConsumableArray(this.state.results).forEach(function (_ref10) {
|
|
600
|
+
var _ref11 = _slicedToArray(_ref10, 2),
|
|
601
|
+
key = _ref11[0],
|
|
602
|
+
item = _ref11[1];
|
|
603
|
+
if (!item.loading) {
|
|
604
|
+
res.set(key, item.result || item.error);
|
|
605
|
+
}
|
|
606
|
+
return false;
|
|
607
|
+
});
|
|
608
|
+
return res;
|
|
609
|
+
}
|
|
595
610
|
}, {
|
|
596
611
|
key: "render",
|
|
597
612
|
value: function render() {
|
|
@@ -630,7 +645,9 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
630
645
|
_this5.handleClose();
|
|
631
646
|
});
|
|
632
647
|
},
|
|
633
|
-
footer: typeof footer === 'function' ? footer(data
|
|
648
|
+
footer: typeof footer === 'function' ? footer(data, {
|
|
649
|
+
results: this.getError()
|
|
650
|
+
}) : footer,
|
|
634
651
|
maskClosable: false,
|
|
635
652
|
afterClose: function afterClose() {
|
|
636
653
|
_this5.setState({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/kits",
|
|
3
|
-
"version": "1.2.12
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"registry": "https://registry.npmjs.org"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "f48a7d76235606c2e4553da3e3374c67003bf66d"
|
|
49
49
|
}
|