wargerm 0.7.58 → 0.7.60
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.
- package/dist/index.esm.js +38 -26
- package/dist/index.js +38 -26
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -6644,11 +6644,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6644
6644
|
record: record,
|
6645
6645
|
modalOnOk: function () {
|
6646
6646
|
var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values, loading) {
|
6647
|
+
var res, _actionRef$current2;
|
6647
6648
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
6648
6649
|
while (1) switch (_context2.prev = _context2.next) {
|
6649
6650
|
case 0:
|
6650
6651
|
if (!item.actionMethod) {
|
6651
|
-
_context2.next =
|
6652
|
+
_context2.next = 5;
|
6652
6653
|
break;
|
6653
6654
|
}
|
6654
6655
|
_context2.next = 3;
|
@@ -6658,6 +6659,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6658
6659
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
|
6659
6660
|
}, record);
|
6660
6661
|
case 3:
|
6662
|
+
res = _context2.sent;
|
6663
|
+
if (res.code == 200) {
|
6664
|
+
loading();
|
6665
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
|
6666
|
+
}
|
6667
|
+
case 5:
|
6661
6668
|
case "end":
|
6662
6669
|
return _context2.stop();
|
6663
6670
|
}
|
@@ -6689,8 +6696,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6689
6696
|
}
|
6690
6697
|
_context3.next = 3;
|
6691
6698
|
return item.actionMethod(record, function () {
|
6692
|
-
var _actionRef$
|
6693
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6699
|
+
var _actionRef$current3;
|
6700
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
|
6694
6701
|
});
|
6695
6702
|
case 3:
|
6696
6703
|
case "end":
|
@@ -6716,8 +6723,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6716
6723
|
}
|
6717
6724
|
_context4.next = 3;
|
6718
6725
|
return item.actionMethod(record, function () {
|
6719
|
-
var _actionRef$
|
6720
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6726
|
+
var _actionRef$current4;
|
6727
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
|
6721
6728
|
}, record);
|
6722
6729
|
case 3:
|
6723
6730
|
case "end":
|
@@ -6742,8 +6749,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6742
6749
|
}
|
6743
6750
|
_context5.next = 3;
|
6744
6751
|
return item.actionMethod(record, function () {
|
6745
|
-
var _actionRef$
|
6746
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6752
|
+
var _actionRef$current5;
|
6753
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
|
6747
6754
|
});
|
6748
6755
|
case 3:
|
6749
6756
|
case "end":
|
@@ -6922,20 +6929,27 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6922
6929
|
record: {},
|
6923
6930
|
modalOnOk: function () {
|
6924
6931
|
var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(values, loading) {
|
6932
|
+
var res, _actionRef$current7;
|
6925
6933
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
6926
6934
|
while (1) switch (_context8.prev = _context8.next) {
|
6927
6935
|
case 0:
|
6928
6936
|
if (!item.actionMethod) {
|
6929
|
-
_context8.next =
|
6937
|
+
_context8.next = 5;
|
6930
6938
|
break;
|
6931
6939
|
}
|
6932
6940
|
_context8.next = 3;
|
6933
6941
|
return item.actionMethod(values, function () {
|
6934
|
-
var _actionRef$
|
6942
|
+
var _actionRef$current6;
|
6935
6943
|
loading();
|
6936
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6944
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload();
|
6937
6945
|
});
|
6938
6946
|
case 3:
|
6947
|
+
res = _context8.sent;
|
6948
|
+
if (res.code == 200) {
|
6949
|
+
loading(); // 关闭弹窗
|
6950
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
|
6951
|
+
}
|
6952
|
+
case 5:
|
6939
6953
|
case "end":
|
6940
6954
|
return _context8.stop();
|
6941
6955
|
}
|
@@ -6971,10 +6985,9 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6971
6985
|
key: item.key,
|
6972
6986
|
type: "primary",
|
6973
6987
|
onClick: function onClick() {
|
6974
|
-
searchFormRef.current;
|
6975
6988
|
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
6976
|
-
var _actionRef$
|
6977
|
-
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6989
|
+
var _actionRef$current8;
|
6990
|
+
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload();
|
6978
6991
|
});
|
6979
6992
|
}
|
6980
6993
|
}, item.icon, " ", item.title)))
|
@@ -6984,10 +6997,9 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6984
6997
|
return {
|
6985
6998
|
config: omit(item, ['type', 'actionMethod', 'actionRender']),
|
6986
6999
|
children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
|
6987
|
-
searchFormRef.current;
|
6988
7000
|
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
6989
|
-
var _actionRef$
|
6990
|
-
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7001
|
+
var _actionRef$current9;
|
7002
|
+
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : _actionRef$current9.reload();
|
6991
7003
|
});
|
6992
7004
|
})
|
6993
7005
|
};
|
@@ -6997,24 +7009,24 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6997
7009
|
});
|
6998
7010
|
}, [actionRef, renderTableBarDeps]);
|
6999
7011
|
var onSubmit = function onSubmit(values) {
|
7000
|
-
var _actionRef$
|
7012
|
+
var _actionRef$current10;
|
7001
7013
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit(values);
|
7002
7014
|
formSearchRef.current = values;
|
7003
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7015
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : _actionRef$current10.reload(true);
|
7004
7016
|
};
|
7005
7017
|
var onKeyUpSubmit = function onKeyUpSubmit(values) {
|
7006
7018
|
if (values.keyCode === 13) {
|
7007
|
-
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$
|
7019
|
+
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$current11;
|
7008
7020
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit((_searchFormRef$curren = searchFormRef.current) === null || _searchFormRef$curren === void 0 ? void 0 : _searchFormRef$curren.getFormValues());
|
7009
7021
|
formSearchRef.current = (_searchFormRef$curren2 = searchFormRef.current) === null || _searchFormRef$curren2 === void 0 ? void 0 : _searchFormRef$curren2.getFormValues();
|
7010
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7022
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : _actionRef$current11.reload(true);
|
7011
7023
|
}
|
7012
7024
|
};
|
7013
7025
|
var onReset = function onReset(values) {
|
7014
|
-
var _actionRef$
|
7026
|
+
var _actionRef$current12;
|
7015
7027
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.onReset) && searchFormConfig.onReset();
|
7016
7028
|
formSearchRef.current = _objectSpread2({}, values);
|
7017
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7029
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current12 = actionRef.current) === null || _actionRef$current12 === void 0 ? void 0 : _actionRef$current12.reload(true);
|
7018
7030
|
};
|
7019
7031
|
useEffect(function () {
|
7020
7032
|
var _searchFormRef$curren3, _searchFormRef$curren4;
|
@@ -7132,12 +7144,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7132
7144
|
tableRequestParmas.current = _objectSpread2(_objectSpread2(_objectSpread2({}, params), formSearchRef.current), {}, {
|
7133
7145
|
pageNum: params.current
|
7134
7146
|
});
|
7135
|
-
if (tableRequestParmas.current.current) delete tableRequestParmas.current.current
|
7136
|
-
_context10.next =
|
7147
|
+
// if (tableRequestParmas.current.current) delete tableRequestParmas.current.current
|
7148
|
+
_context10.next = 3;
|
7137
7149
|
return _request(tableRequestParmas.current);
|
7138
|
-
case
|
7150
|
+
case 3:
|
7139
7151
|
return _context10.abrupt("return", _context10.sent);
|
7140
|
-
case
|
7152
|
+
case 4:
|
7141
7153
|
case "end":
|
7142
7154
|
return _context10.stop();
|
7143
7155
|
}
|
package/dist/index.js
CHANGED
@@ -6688,11 +6688,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6688
6688
|
record: record,
|
6689
6689
|
modalOnOk: function () {
|
6690
6690
|
var _modalOnOk2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(values, loading) {
|
6691
|
+
var res, _actionRef$current2;
|
6691
6692
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
6692
6693
|
while (1) switch (_context2.prev = _context2.next) {
|
6693
6694
|
case 0:
|
6694
6695
|
if (!item.actionMethod) {
|
6695
|
-
_context2.next =
|
6696
|
+
_context2.next = 5;
|
6696
6697
|
break;
|
6697
6698
|
}
|
6698
6699
|
_context2.next = 3;
|
@@ -6702,6 +6703,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6702
6703
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
|
6703
6704
|
}, record);
|
6704
6705
|
case 3:
|
6706
|
+
res = _context2.sent;
|
6707
|
+
if (res.code == 200) {
|
6708
|
+
loading();
|
6709
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : _actionRef$current2.reload();
|
6710
|
+
}
|
6711
|
+
case 5:
|
6705
6712
|
case "end":
|
6706
6713
|
return _context2.stop();
|
6707
6714
|
}
|
@@ -6733,8 +6740,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6733
6740
|
}
|
6734
6741
|
_context3.next = 3;
|
6735
6742
|
return item.actionMethod(record, function () {
|
6736
|
-
var _actionRef$
|
6737
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6743
|
+
var _actionRef$current3;
|
6744
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : _actionRef$current3.reload();
|
6738
6745
|
});
|
6739
6746
|
case 3:
|
6740
6747
|
case "end":
|
@@ -6760,8 +6767,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6760
6767
|
}
|
6761
6768
|
_context4.next = 3;
|
6762
6769
|
return item.actionMethod(record, function () {
|
6763
|
-
var _actionRef$
|
6764
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6770
|
+
var _actionRef$current4;
|
6771
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
|
6765
6772
|
}, record);
|
6766
6773
|
case 3:
|
6767
6774
|
case "end":
|
@@ -6786,8 +6793,8 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6786
6793
|
}
|
6787
6794
|
_context5.next = 3;
|
6788
6795
|
return item.actionMethod(record, function () {
|
6789
|
-
var _actionRef$
|
6790
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6796
|
+
var _actionRef$current5;
|
6797
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : _actionRef$current5.reload();
|
6791
6798
|
});
|
6792
6799
|
case 3:
|
6793
6800
|
case "end":
|
@@ -6966,20 +6973,27 @@ var TabelCard = function TabelCard(props, ref) {
|
|
6966
6973
|
record: {},
|
6967
6974
|
modalOnOk: function () {
|
6968
6975
|
var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(values, loading) {
|
6976
|
+
var res, _actionRef$current7;
|
6969
6977
|
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
6970
6978
|
while (1) switch (_context8.prev = _context8.next) {
|
6971
6979
|
case 0:
|
6972
6980
|
if (!item.actionMethod) {
|
6973
|
-
_context8.next =
|
6981
|
+
_context8.next = 5;
|
6974
6982
|
break;
|
6975
6983
|
}
|
6976
6984
|
_context8.next = 3;
|
6977
6985
|
return item.actionMethod(values, function () {
|
6978
|
-
var _actionRef$
|
6986
|
+
var _actionRef$current6;
|
6979
6987
|
loading();
|
6980
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
6988
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : _actionRef$current6.reload();
|
6981
6989
|
});
|
6982
6990
|
case 3:
|
6991
|
+
res = _context8.sent;
|
6992
|
+
if (res.code == 200) {
|
6993
|
+
loading(); // 关闭弹窗
|
6994
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : _actionRef$current7.reload();
|
6995
|
+
}
|
6996
|
+
case 5:
|
6983
6997
|
case "end":
|
6984
6998
|
return _context8.stop();
|
6985
6999
|
}
|
@@ -7015,10 +7029,9 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7015
7029
|
key: item.key,
|
7016
7030
|
type: "primary",
|
7017
7031
|
onClick: function onClick() {
|
7018
|
-
searchFormRef.current;
|
7019
7032
|
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
7020
|
-
var _actionRef$
|
7021
|
-
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7033
|
+
var _actionRef$current8;
|
7034
|
+
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload();
|
7022
7035
|
});
|
7023
7036
|
}
|
7024
7037
|
}, item.icon, " ", item.title)))
|
@@ -7028,10 +7041,9 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7028
7041
|
return {
|
7029
7042
|
config: lodashEs.omit(item, ['type', 'actionMethod', 'actionRender']),
|
7030
7043
|
children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
|
7031
|
-
searchFormRef.current;
|
7032
7044
|
item.actionMethod && item.actionMethod(tableRequestParmas.current, function () {
|
7033
|
-
var _actionRef$
|
7034
|
-
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7045
|
+
var _actionRef$current9;
|
7046
|
+
return actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : _actionRef$current9.reload();
|
7035
7047
|
});
|
7036
7048
|
})
|
7037
7049
|
};
|
@@ -7041,24 +7053,24 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7041
7053
|
});
|
7042
7054
|
}, [actionRef, renderTableBarDeps]);
|
7043
7055
|
var onSubmit = function onSubmit(values) {
|
7044
|
-
var _actionRef$
|
7056
|
+
var _actionRef$current10;
|
7045
7057
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit(values);
|
7046
7058
|
formSearchRef.current = values;
|
7047
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7059
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current10 = actionRef.current) === null || _actionRef$current10 === void 0 ? void 0 : _actionRef$current10.reload(true);
|
7048
7060
|
};
|
7049
7061
|
var onKeyUpSubmit = function onKeyUpSubmit(values) {
|
7050
7062
|
if (values.keyCode === 13) {
|
7051
|
-
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$
|
7063
|
+
var _searchFormRef$curren, _searchFormRef$curren2, _actionRef$current11;
|
7052
7064
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.handleSubmit) && searchFormConfig.handleSubmit((_searchFormRef$curren = searchFormRef.current) === null || _searchFormRef$curren === void 0 ? void 0 : _searchFormRef$curren.getFormValues());
|
7053
7065
|
formSearchRef.current = (_searchFormRef$curren2 = searchFormRef.current) === null || _searchFormRef$curren2 === void 0 ? void 0 : _searchFormRef$curren2.getFormValues();
|
7054
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7066
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current11 = actionRef.current) === null || _actionRef$current11 === void 0 ? void 0 : _actionRef$current11.reload(true);
|
7055
7067
|
}
|
7056
7068
|
};
|
7057
7069
|
var onReset = function onReset(values) {
|
7058
|
-
var _actionRef$
|
7070
|
+
var _actionRef$current12;
|
7059
7071
|
(searchFormConfig === null || searchFormConfig === void 0 ? void 0 : searchFormConfig.onReset) && searchFormConfig.onReset();
|
7060
7072
|
formSearchRef.current = _objectSpread2({}, values);
|
7061
|
-
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$
|
7073
|
+
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current12 = actionRef.current) === null || _actionRef$current12 === void 0 ? void 0 : _actionRef$current12.reload(true);
|
7062
7074
|
};
|
7063
7075
|
React.useEffect(function () {
|
7064
7076
|
var _searchFormRef$curren3, _searchFormRef$curren4;
|
@@ -7176,12 +7188,12 @@ var TabelCard = function TabelCard(props, ref) {
|
|
7176
7188
|
tableRequestParmas.current = _objectSpread2(_objectSpread2(_objectSpread2({}, params), formSearchRef.current), {}, {
|
7177
7189
|
pageNum: params.current
|
7178
7190
|
});
|
7179
|
-
if (tableRequestParmas.current.current) delete tableRequestParmas.current.current
|
7180
|
-
_context10.next =
|
7191
|
+
// if (tableRequestParmas.current.current) delete tableRequestParmas.current.current
|
7192
|
+
_context10.next = 3;
|
7181
7193
|
return _request(tableRequestParmas.current);
|
7182
|
-
case
|
7194
|
+
case 3:
|
7183
7195
|
return _context10.abrupt("return", _context10.sent);
|
7184
|
-
case
|
7196
|
+
case 4:
|
7185
7197
|
case "end":
|
7186
7198
|
return _context10.stop();
|
7187
7199
|
}
|