wargerm 0.7.62 → 0.7.64

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
@@ -6502,18 +6502,21 @@ var ModalForm = function ModalForm(props, ref) {
6502
6502
  while (1) switch (_context2.prev = _context2.next) {
6503
6503
  case 0:
6504
6504
  setConfirmLoading(true);
6505
- res = {};
6506
6505
  if (!submitMethod) {
6507
6506
  _context2.next = 7;
6508
6507
  break;
6509
6508
  }
6510
- _context2.next = 5;
6509
+ _context2.next = 4;
6511
6510
  return submitMethod(values, function () {
6512
6511
  setOpen(false);
6513
6512
  onCancel && onCancel();
6514
6513
  });
6515
- case 5:
6514
+ case 4:
6516
6515
  res = _context2.sent;
6516
+ if (res.code == 200) {
6517
+ setOpen(false);
6518
+ onCancel && onCancel();
6519
+ }
6517
6520
  setConfirmLoading(false);
6518
6521
  case 7:
6519
6522
  case "end":
@@ -6842,6 +6845,13 @@ var TabelCard = function TabelCard(props, ref) {
6842
6845
  };
6843
6846
  return [].concat(_toConsumableArray(tableAction1.map(function (item, i) {
6844
6847
  var _actionHandler$item$t4;
6848
+ if (item.type == 'custom') {
6849
+ actionConfig[item.type] = {
6850
+ title: item.title,
6851
+ key: item.key,
6852
+ icon: item.icon
6853
+ };
6854
+ }
6845
6855
  var btn = actionConfig[item.type];
6846
6856
  if (btn) {
6847
6857
  return /*#__PURE__*/React.createElement(Tooltip, {
@@ -7081,7 +7091,7 @@ var TabelCard = function TabelCard(props, ref) {
7081
7091
  }, modalConfig), {}, {
7082
7092
  onFormChange: onFormChange,
7083
7093
  extraColumns: (extraColumns || []).filter(function (item) {
7084
- if (item.hiddenInModalForm) {
7094
+ if (item.hiddenInModalForm || item.hideInModalForm) {
7085
7095
  return false;
7086
7096
  }
7087
7097
  if (item.onlyShowInView) {
@@ -7094,7 +7104,7 @@ var TabelCard = function TabelCard(props, ref) {
7094
7104
  return true;
7095
7105
  }),
7096
7106
  columns: (modalFormColumn || []).filter(function (item) {
7097
- if (item.hiddenInModalForm) {
7107
+ if (item.hiddenInModalForm || item.hideInModalForm) {
7098
7108
  return false;
7099
7109
  }
7100
7110
  if (item.onlyShowInView) {
@@ -7166,6 +7176,7 @@ var TabelCard = function TabelCard(props, ref) {
7166
7176
  align: 'center',
7167
7177
  hideInSearch: true,
7168
7178
  hiddenInModalForm: true,
7179
+ hideInModalForm: true,
7169
7180
  width: 60,
7170
7181
  render: function render(text, record, index) {
7171
7182
  return index + 1;
package/dist/index.js CHANGED
@@ -6546,18 +6546,21 @@ var ModalForm = function ModalForm(props, ref) {
6546
6546
  while (1) switch (_context2.prev = _context2.next) {
6547
6547
  case 0:
6548
6548
  setConfirmLoading(true);
6549
- res = {};
6550
6549
  if (!submitMethod) {
6551
6550
  _context2.next = 7;
6552
6551
  break;
6553
6552
  }
6554
- _context2.next = 5;
6553
+ _context2.next = 4;
6555
6554
  return submitMethod(values, function () {
6556
6555
  setOpen(false);
6557
6556
  onCancel && onCancel();
6558
6557
  });
6559
- case 5:
6558
+ case 4:
6560
6559
  res = _context2.sent;
6560
+ if (res.code == 200) {
6561
+ setOpen(false);
6562
+ onCancel && onCancel();
6563
+ }
6561
6564
  setConfirmLoading(false);
6562
6565
  case 7:
6563
6566
  case "end":
@@ -6886,6 +6889,13 @@ var TabelCard = function TabelCard(props, ref) {
6886
6889
  };
6887
6890
  return [].concat(_toConsumableArray(tableAction1.map(function (item, i) {
6888
6891
  var _actionHandler$item$t4;
6892
+ if (item.type == 'custom') {
6893
+ actionConfig[item.type] = {
6894
+ title: item.title,
6895
+ key: item.key,
6896
+ icon: item.icon
6897
+ };
6898
+ }
6889
6899
  var btn = actionConfig[item.type];
6890
6900
  if (btn) {
6891
6901
  return /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
@@ -7125,7 +7135,7 @@ var TabelCard = function TabelCard(props, ref) {
7125
7135
  }, modalConfig), {}, {
7126
7136
  onFormChange: onFormChange,
7127
7137
  extraColumns: (extraColumns || []).filter(function (item) {
7128
- if (item.hiddenInModalForm) {
7138
+ if (item.hiddenInModalForm || item.hideInModalForm) {
7129
7139
  return false;
7130
7140
  }
7131
7141
  if (item.onlyShowInView) {
@@ -7138,7 +7148,7 @@ var TabelCard = function TabelCard(props, ref) {
7138
7148
  return true;
7139
7149
  }),
7140
7150
  columns: (modalFormColumn || []).filter(function (item) {
7141
- if (item.hiddenInModalForm) {
7151
+ if (item.hiddenInModalForm || item.hideInModalForm) {
7142
7152
  return false;
7143
7153
  }
7144
7154
  if (item.onlyShowInView) {
@@ -7210,6 +7220,7 @@ var TabelCard = function TabelCard(props, ref) {
7210
7220
  align: 'center',
7211
7221
  hideInSearch: true,
7212
7222
  hiddenInModalForm: true,
7223
+ hideInModalForm: true,
7213
7224
  width: 60,
7214
7225
  render: function render(text, record, index) {
7215
7226
  return index + 1;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.62",
4
+ "version": "0.7.64",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",