wargerm 0.5.28 → 0.5.29

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
@@ -10613,6 +10613,7 @@ var ModalForm = function ModalForm(props, ref) {
10613
10613
  _context2.next = 5;
10614
10614
  return submitMethod(values, function () {
10615
10615
  setVisible(false);
10616
+ onCancel && onCancel();
10616
10617
  });
10617
10618
 
10618
10619
  case 5:
@@ -10899,11 +10900,45 @@ var TabelCard = function TabelCard(props, ref) {
10899
10900
  key: i
10900
10901
  }, /*#__PURE__*/React.createElement("a", {
10901
10902
  key: btn.key,
10902
- onClick: function onClick() {
10903
- var _actionHandler$item$t;
10903
+ onClick: function () {
10904
+ var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
10905
+ var _actionHandler$item$t;
10906
+
10907
+ var info;
10908
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
10909
+ while (1) {
10910
+ switch (_context5.prev = _context5.next) {
10911
+ case 0:
10912
+ info = null;
10913
+
10914
+ if (!item.fetchInfo) {
10915
+ _context5.next = 5;
10916
+ break;
10917
+ }
10904
10918
 
10905
- return (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, record, index);
10906
- }
10919
+ _context5.next = 4;
10920
+ return item.fetchInfo(record);
10921
+
10922
+ case 4:
10923
+ info = _context5.sent;
10924
+
10925
+ case 5:
10926
+ (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, info || record, index);
10927
+
10928
+ case 6:
10929
+ case "end":
10930
+ return _context5.stop();
10931
+ }
10932
+ }
10933
+ }, _callee5);
10934
+ }));
10935
+
10936
+ function onClick() {
10937
+ return _onClick.apply(this, arguments);
10938
+ }
10939
+
10940
+ return onClick;
10941
+ }()
10907
10942
  }, btn.icon, " ", btn.title));
10908
10943
  }
10909
10944
 
@@ -10922,11 +10957,45 @@ var TabelCard = function TabelCard(props, ref) {
10922
10957
  key: i
10923
10958
  }, /*#__PURE__*/React.createElement("a", {
10924
10959
  key: btn.key,
10925
- onClick: function onClick() {
10926
- var _actionHandler$item$t3;
10960
+ onClick: function () {
10961
+ var _onClick2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
10962
+ var _actionHandler$item$t3;
10963
+
10964
+ var info;
10965
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
10966
+ while (1) {
10967
+ switch (_context6.prev = _context6.next) {
10968
+ case 0:
10969
+ info = null;
10970
+
10971
+ if (!item.fetchInfo) {
10972
+ _context6.next = 5;
10973
+ break;
10974
+ }
10927
10975
 
10928
- return (_actionHandler$item$t3 = actionHandler[item.type]) === null || _actionHandler$item$t3 === void 0 ? void 0 : _actionHandler$item$t3.call(actionHandler, item, record, index);
10929
- }
10976
+ _context6.next = 4;
10977
+ return item.fetchInfo(record);
10978
+
10979
+ case 4:
10980
+ info = _context6.sent;
10981
+
10982
+ case 5:
10983
+ (_actionHandler$item$t3 = actionHandler[item.type]) === null || _actionHandler$item$t3 === void 0 ? void 0 : _actionHandler$item$t3.call(actionHandler, item, info || record, index);
10984
+
10985
+ case 6:
10986
+ case "end":
10987
+ return _context6.stop();
10988
+ }
10989
+ }
10990
+ }, _callee6);
10991
+ }));
10992
+
10993
+ function onClick() {
10994
+ return _onClick2.apply(this, arguments);
10995
+ }
10996
+
10997
+ return onClick;
10998
+ }()
10930
10999
  }, btn.icon, " ", btn.title));
10931
11000
  }
10932
11001
 
@@ -10980,17 +11049,17 @@ var TabelCard = function TabelCard(props, ref) {
10980
11049
  type: '新增',
10981
11050
  record: {},
10982
11051
  modalOnOk: function () {
10983
- var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(values, loading) {
10984
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
11052
+ var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
11053
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
10985
11054
  while (1) {
10986
- switch (_context5.prev = _context5.next) {
11055
+ switch (_context7.prev = _context7.next) {
10987
11056
  case 0:
10988
11057
  if (!item.actionMethod) {
10989
- _context5.next = 3;
11058
+ _context7.next = 3;
10990
11059
  break;
10991
11060
  }
10992
11061
 
10993
- _context5.next = 3;
11062
+ _context7.next = 3;
10994
11063
  return item.actionMethod(values, function () {
10995
11064
  var _actionRef$current4;
10996
11065
 
@@ -11000,10 +11069,10 @@ var TabelCard = function TabelCard(props, ref) {
11000
11069
 
11001
11070
  case 3:
11002
11071
  case "end":
11003
- return _context5.stop();
11072
+ return _context7.stop();
11004
11073
  }
11005
11074
  }
11006
- }, _callee5);
11075
+ }, _callee7);
11007
11076
  }));
11008
11077
 
11009
11078
  function modalOnOk(_x3, _x4) {
@@ -11067,25 +11136,25 @@ var TabelCard = function TabelCard(props, ref) {
11067
11136
  disabled: modalFormConfig.type == '查看',
11068
11137
  setVisible: setVisible,
11069
11138
  submitMethod: function () {
11070
- var _submitMethod = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(values, loading) {
11071
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
11139
+ var _submitMethod = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(values, loading) {
11140
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
11072
11141
  while (1) {
11073
- switch (_context6.prev = _context6.next) {
11142
+ switch (_context8.prev = _context8.next) {
11074
11143
  case 0:
11075
11144
  if (!modalFormConfig.modalOnOk) {
11076
- _context6.next = 3;
11145
+ _context8.next = 3;
11077
11146
  break;
11078
11147
  }
11079
11148
 
11080
- _context6.next = 3;
11149
+ _context8.next = 3;
11081
11150
  return modalFormConfig.modalOnOk(values, loading);
11082
11151
 
11083
11152
  case 3:
11084
11153
  case "end":
11085
- return _context6.stop();
11154
+ return _context8.stop();
11086
11155
  }
11087
11156
  }
11088
- }, _callee6);
11157
+ }, _callee8);
11089
11158
  }));
11090
11159
 
11091
11160
  function submitMethod(_x5, _x6) {
@@ -11159,23 +11228,23 @@ var TabelCard = function TabelCard(props, ref) {
11159
11228
  toolBarRender: false
11160
11229
  }, _request ? {
11161
11230
  request: function () {
11162
- var _request2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(params) {
11163
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
11231
+ var _request2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(params) {
11232
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
11164
11233
  while (1) {
11165
- switch (_context7.prev = _context7.next) {
11234
+ switch (_context9.prev = _context9.next) {
11166
11235
  case 0:
11167
- _context7.next = 2;
11236
+ _context9.next = 2;
11168
11237
  return _request(_objectSpread2(_objectSpread2({}, params), formSearch));
11169
11238
 
11170
11239
  case 2:
11171
- return _context7.abrupt("return", _context7.sent);
11240
+ return _context9.abrupt("return", _context9.sent);
11172
11241
 
11173
11242
  case 3:
11174
11243
  case "end":
11175
- return _context7.stop();
11244
+ return _context9.stop();
11176
11245
  }
11177
11246
  }
11178
- }, _callee7);
11247
+ }, _callee9);
11179
11248
  }));
11180
11249
 
11181
11250
  function request(_x7) {
package/dist/index.js CHANGED
@@ -10674,6 +10674,7 @@ var ModalForm = function ModalForm(props, ref) {
10674
10674
  _context2.next = 5;
10675
10675
  return submitMethod(values, function () {
10676
10676
  setVisible(false);
10677
+ onCancel && onCancel();
10677
10678
  });
10678
10679
 
10679
10680
  case 5:
@@ -10960,11 +10961,45 @@ var TabelCard = function TabelCard(props, ref) {
10960
10961
  key: i
10961
10962
  }, /*#__PURE__*/React__default['default'].createElement("a", {
10962
10963
  key: btn.key,
10963
- onClick: function onClick() {
10964
- var _actionHandler$item$t;
10964
+ onClick: function () {
10965
+ var _onClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
10966
+ var _actionHandler$item$t;
10967
+
10968
+ var info;
10969
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
10970
+ while (1) {
10971
+ switch (_context5.prev = _context5.next) {
10972
+ case 0:
10973
+ info = null;
10974
+
10975
+ if (!item.fetchInfo) {
10976
+ _context5.next = 5;
10977
+ break;
10978
+ }
10965
10979
 
10966
- return (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, record, index);
10967
- }
10980
+ _context5.next = 4;
10981
+ return item.fetchInfo(record);
10982
+
10983
+ case 4:
10984
+ info = _context5.sent;
10985
+
10986
+ case 5:
10987
+ (_actionHandler$item$t = actionHandler[item.type]) === null || _actionHandler$item$t === void 0 ? void 0 : _actionHandler$item$t.call(actionHandler, item, info || record, index);
10988
+
10989
+ case 6:
10990
+ case "end":
10991
+ return _context5.stop();
10992
+ }
10993
+ }
10994
+ }, _callee5);
10995
+ }));
10996
+
10997
+ function onClick() {
10998
+ return _onClick.apply(this, arguments);
10999
+ }
11000
+
11001
+ return onClick;
11002
+ }()
10968
11003
  }, btn.icon, " ", btn.title));
10969
11004
  }
10970
11005
 
@@ -10983,11 +11018,45 @@ var TabelCard = function TabelCard(props, ref) {
10983
11018
  key: i
10984
11019
  }, /*#__PURE__*/React__default['default'].createElement("a", {
10985
11020
  key: btn.key,
10986
- onClick: function onClick() {
10987
- var _actionHandler$item$t3;
11021
+ onClick: function () {
11022
+ var _onClick2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
11023
+ var _actionHandler$item$t3;
11024
+
11025
+ var info;
11026
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
11027
+ while (1) {
11028
+ switch (_context6.prev = _context6.next) {
11029
+ case 0:
11030
+ info = null;
11031
+
11032
+ if (!item.fetchInfo) {
11033
+ _context6.next = 5;
11034
+ break;
11035
+ }
10988
11036
 
10989
- return (_actionHandler$item$t3 = actionHandler[item.type]) === null || _actionHandler$item$t3 === void 0 ? void 0 : _actionHandler$item$t3.call(actionHandler, item, record, index);
10990
- }
11037
+ _context6.next = 4;
11038
+ return item.fetchInfo(record);
11039
+
11040
+ case 4:
11041
+ info = _context6.sent;
11042
+
11043
+ case 5:
11044
+ (_actionHandler$item$t3 = actionHandler[item.type]) === null || _actionHandler$item$t3 === void 0 ? void 0 : _actionHandler$item$t3.call(actionHandler, item, info || record, index);
11045
+
11046
+ case 6:
11047
+ case "end":
11048
+ return _context6.stop();
11049
+ }
11050
+ }
11051
+ }, _callee6);
11052
+ }));
11053
+
11054
+ function onClick() {
11055
+ return _onClick2.apply(this, arguments);
11056
+ }
11057
+
11058
+ return onClick;
11059
+ }()
10991
11060
  }, btn.icon, " ", btn.title));
10992
11061
  }
10993
11062
 
@@ -11041,17 +11110,17 @@ var TabelCard = function TabelCard(props, ref) {
11041
11110
  type: '新增',
11042
11111
  record: {},
11043
11112
  modalOnOk: function () {
11044
- var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(values, loading) {
11045
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
11113
+ var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
11114
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
11046
11115
  while (1) {
11047
- switch (_context5.prev = _context5.next) {
11116
+ switch (_context7.prev = _context7.next) {
11048
11117
  case 0:
11049
11118
  if (!item.actionMethod) {
11050
- _context5.next = 3;
11119
+ _context7.next = 3;
11051
11120
  break;
11052
11121
  }
11053
11122
 
11054
- _context5.next = 3;
11123
+ _context7.next = 3;
11055
11124
  return item.actionMethod(values, function () {
11056
11125
  var _actionRef$current4;
11057
11126
 
@@ -11061,10 +11130,10 @@ var TabelCard = function TabelCard(props, ref) {
11061
11130
 
11062
11131
  case 3:
11063
11132
  case "end":
11064
- return _context5.stop();
11133
+ return _context7.stop();
11065
11134
  }
11066
11135
  }
11067
- }, _callee5);
11136
+ }, _callee7);
11068
11137
  }));
11069
11138
 
11070
11139
  function modalOnOk(_x3, _x4) {
@@ -11128,25 +11197,25 @@ var TabelCard = function TabelCard(props, ref) {
11128
11197
  disabled: modalFormConfig.type == '查看',
11129
11198
  setVisible: setVisible,
11130
11199
  submitMethod: function () {
11131
- var _submitMethod = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(values, loading) {
11132
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
11200
+ var _submitMethod = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(values, loading) {
11201
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
11133
11202
  while (1) {
11134
- switch (_context6.prev = _context6.next) {
11203
+ switch (_context8.prev = _context8.next) {
11135
11204
  case 0:
11136
11205
  if (!modalFormConfig.modalOnOk) {
11137
- _context6.next = 3;
11206
+ _context8.next = 3;
11138
11207
  break;
11139
11208
  }
11140
11209
 
11141
- _context6.next = 3;
11210
+ _context8.next = 3;
11142
11211
  return modalFormConfig.modalOnOk(values, loading);
11143
11212
 
11144
11213
  case 3:
11145
11214
  case "end":
11146
- return _context6.stop();
11215
+ return _context8.stop();
11147
11216
  }
11148
11217
  }
11149
- }, _callee6);
11218
+ }, _callee8);
11150
11219
  }));
11151
11220
 
11152
11221
  function submitMethod(_x5, _x6) {
@@ -11220,23 +11289,23 @@ var TabelCard = function TabelCard(props, ref) {
11220
11289
  toolBarRender: false
11221
11290
  }, _request ? {
11222
11291
  request: function () {
11223
- var _request2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(params) {
11224
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
11292
+ var _request2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(params) {
11293
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
11225
11294
  while (1) {
11226
- switch (_context7.prev = _context7.next) {
11295
+ switch (_context9.prev = _context9.next) {
11227
11296
  case 0:
11228
- _context7.next = 2;
11297
+ _context9.next = 2;
11229
11298
  return _request(_objectSpread2(_objectSpread2({}, params), formSearch));
11230
11299
 
11231
11300
  case 2:
11232
- return _context7.abrupt("return", _context7.sent);
11301
+ return _context9.abrupt("return", _context9.sent);
11233
11302
 
11234
11303
  case 3:
11235
11304
  case "end":
11236
- return _context7.stop();
11305
+ return _context9.stop();
11237
11306
  }
11238
11307
  }
11239
- }, _callee7);
11308
+ }, _callee9);
11240
11309
  }));
11241
11310
 
11242
11311
  function request(_x7) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.5.28",
4
+ "version": "0.5.29",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",