@lemon-fe/kits 1.5.4 → 1.5.6
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.
|
@@ -130,6 +130,18 @@ interface Props<RecordType extends Record<string, any> = Record<string, any>, Re
|
|
|
130
130
|
* @description 开始执行/继续执行按钮属性
|
|
131
131
|
*/
|
|
132
132
|
executeActionProps?: ButtonProps;
|
|
133
|
+
/**
|
|
134
|
+
* 开始执行按钮替换文案
|
|
135
|
+
*/
|
|
136
|
+
executeStartExecText?: string;
|
|
137
|
+
/**
|
|
138
|
+
* 继续执行按钮替换文案
|
|
139
|
+
*/
|
|
140
|
+
executeContinueText?: string;
|
|
141
|
+
/**
|
|
142
|
+
* 暂停按钮属性
|
|
143
|
+
*/
|
|
144
|
+
suspendActionProps?: ButtonProps;
|
|
133
145
|
}
|
|
134
146
|
export default function useBatchOperate<RecordType extends Record<string, any> = Record<string, any>, ResultType = any, ParamsType = any>(options: Props<RecordType, ResultType, ParamsType>): {
|
|
135
147
|
run: (rows: RecordType[], otherOpts?: Partial<Props<RecordType, ResultType, ParamsType>>) => void;
|
|
@@ -672,7 +672,10 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
672
672
|
footer = _this$props4$footer === void 0 ? null : _this$props4$footer,
|
|
673
673
|
sideBar = _this$props4.sideBar,
|
|
674
674
|
customColumnPanelStorage = _this$props4.customColumnPanelStorage,
|
|
675
|
-
executeActionProps = _this$props4.executeActionProps
|
|
675
|
+
executeActionProps = _this$props4.executeActionProps,
|
|
676
|
+
executeContinueText = _this$props4.executeContinueText,
|
|
677
|
+
executeStartExecText = _this$props4.executeStartExecText,
|
|
678
|
+
suspendActionProps = _this$props4.suspendActionProps;
|
|
676
679
|
var _this$state = this.state,
|
|
677
680
|
results = _this$state.results,
|
|
678
681
|
open = _this$state.open,
|
|
@@ -684,6 +687,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
684
687
|
continueText = _this$locale3.continueText,
|
|
685
688
|
startExecText = _this$locale3.startExecText,
|
|
686
689
|
suspendExecText = _this$locale3.suspendExecText;
|
|
690
|
+
var executeActionText = this.queue.size > 0 ? executeContinueText || continueText : executeStartExecText || startExecText;
|
|
687
691
|
return /*#__PURE__*/_jsx(Modal, {
|
|
688
692
|
title: modalTitle,
|
|
689
693
|
width: 1000,
|
|
@@ -724,7 +728,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
724
728
|
}), /*#__PURE__*/_jsx(Actions, {
|
|
725
729
|
actions: [paused ? _objectSpread(_objectSpread({}, executeActionProps), {}, {
|
|
726
730
|
disabled: data.length <= 0 || results.size >= data.length,
|
|
727
|
-
text:
|
|
731
|
+
text: executeActionText,
|
|
728
732
|
onClick: function onClick() {
|
|
729
733
|
if (_this6.queue.size === 0) {
|
|
730
734
|
_this6.queue.addAll(_this6.state.data.map(function (row) {
|
|
@@ -738,7 +742,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
738
742
|
paused: false
|
|
739
743
|
});
|
|
740
744
|
}
|
|
741
|
-
}) : {
|
|
745
|
+
}) : _objectSpread(_objectSpread({}, suspendActionProps), {}, {
|
|
742
746
|
disabled: data.length <= 0,
|
|
743
747
|
text: suspendExecText,
|
|
744
748
|
onClick: function onClick() {
|
|
@@ -747,7 +751,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
|
|
|
747
751
|
paused: true
|
|
748
752
|
});
|
|
749
753
|
}
|
|
750
|
-
}]
|
|
754
|
+
})]
|
|
751
755
|
})]
|
|
752
756
|
}),
|
|
753
757
|
children: /*#__PURE__*/_jsx(Section, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/kits",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
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.5.
|
|
27
|
+
"@lemon-fe/components": "^1.5.6",
|
|
28
28
|
"@lemon-fe/hooks": "^1.4.27-alpha.0",
|
|
29
29
|
"@lemon-fe/utils": "^1.4.15",
|
|
30
30
|
"ag-grid-community": "29.2.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"registry": "https://registry.npmjs.org"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "1098e017cce5db0a5353967a7deac0b690f37572"
|
|
51
51
|
}
|