wargerm 0.7.58 → 0.7.59

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