@lemon-fe/kits 1.2.2 → 1.2.4
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.
|
@@ -34,6 +34,10 @@ interface Props<RecordType extends Record<string, any> = Record<string, any>, Re
|
|
|
34
34
|
process?: ProcessStep<RecordType, any>[] | ((parmas?: ParamsType) => ProcessStep<RecordType, any>[]);
|
|
35
35
|
columns?: ColType<RecordType>[];
|
|
36
36
|
rowKey: DataGridProps<RecordType>['rowKey'];
|
|
37
|
+
/**
|
|
38
|
+
* @description modal footer 默认为null
|
|
39
|
+
*/
|
|
40
|
+
footer?: ReactNode | ((record: RecordType[]) => ReactNode);
|
|
37
41
|
/**
|
|
38
42
|
* @description 关闭时触发
|
|
39
43
|
* @param success 成功的结果
|
|
@@ -592,7 +592,9 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
592
592
|
var _this$props4 = this.props,
|
|
593
593
|
modalTitle = _this$props4.modalTitle,
|
|
594
594
|
_afterClose = _this$props4.afterClose,
|
|
595
|
-
rowKey = _this$props4.rowKey
|
|
595
|
+
rowKey = _this$props4.rowKey,
|
|
596
|
+
_this$props4$footer = _this$props4.footer,
|
|
597
|
+
footer = _this$props4$footer === void 0 ? null : _this$props4$footer;
|
|
596
598
|
var _this$state2 = this.state,
|
|
597
599
|
results = _this$state2.results,
|
|
598
600
|
open = _this$state2.open,
|
|
@@ -620,7 +622,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
620
622
|
_this5.handleClose();
|
|
621
623
|
});
|
|
622
624
|
},
|
|
623
|
-
footer:
|
|
625
|
+
footer: typeof footer === 'function' ? footer(data) : footer,
|
|
624
626
|
maskClosable: false,
|
|
625
627
|
afterClose: function afterClose() {
|
|
626
628
|
_this5.setState({
|
|
@@ -686,7 +688,6 @@ export default function useBatchOperate(options) {
|
|
|
686
688
|
render( /*#__PURE__*/_jsx(ConfigProvider, {
|
|
687
689
|
prefixCls: getPrefixCls(),
|
|
688
690
|
iconPrefixCls: iconPrefixCls,
|
|
689
|
-
locale: locale,
|
|
690
691
|
children: /*#__PURE__*/_jsx(ComponentConfigureContext.Provider, {
|
|
691
692
|
value: componentCtx,
|
|
692
693
|
children: /*#__PURE__*/_jsx(BatchOperate, _objectSpread(_objectSpread(_objectSpread({
|
|
@@ -5,7 +5,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
8
|
-
import { Modal } from '
|
|
8
|
+
import { Modal } from '@lemon-fe/kits';
|
|
9
9
|
/**
|
|
10
10
|
* 为了简化,只会阻止最后一个且当前路由下的history blocker;
|
|
11
11
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/kits",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@ant-design/icons": "^4.7.0",
|
|
27
|
-
"@lemon-fe/components": "^1.2.
|
|
27
|
+
"@lemon-fe/components": "^1.2.3",
|
|
28
28
|
"@lemon-fe/hooks": "^1.2.0",
|
|
29
29
|
"@lemon-fe/utils": "^1.1.0",
|
|
30
30
|
"antd": "4.24.8",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"registry": "https://registry.npmjs.org"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "0dbae3c7542ddfaf1451fa6f4c3abc35a4390b64"
|
|
49
49
|
}
|