wargerm 0.7.42 → 0.7.44

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: () => JSX.Element;
3
+ export default _default;
package/dist/index.esm.js CHANGED
@@ -4762,7 +4762,8 @@ function Table(_ref) {
4762
4762
  }
4763
4763
  }, _callee);
4764
4764
  }))();
4765
- }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
4765
+ }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch // JSON.stringify(columns),
4766
+ ]);
4766
4767
 
4767
4768
  var onFormSubmit = function onFormSubmit(values) {
4768
4769
  onSubmit && onSubmit(values);
@@ -7523,53 +7524,57 @@ var TabelCard = function TabelCard(props, ref) {
7523
7524
  var tableBarDom = useMemo(function () {
7524
7525
  return renderTableBar === null || renderTableBar === void 0 ? void 0 : renderTableBar.map(function (item) {
7525
7526
  if (item.type === 'add') {
7527
+ var clickHandle = function clickHandle() {
7528
+ return openFormModel({
7529
+ type: '新增',
7530
+ record: {},
7531
+ modalOnOk: function () {
7532
+ var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
7533
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
7534
+ while (1) {
7535
+ switch (_context7.prev = _context7.next) {
7536
+ case 0:
7537
+ if (!item.actionMethod) {
7538
+ _context7.next = 3;
7539
+ break;
7540
+ }
7541
+
7542
+ _context7.next = 3;
7543
+ return item.actionMethod(values, function () {
7544
+ var _actionRef$current4;
7545
+
7546
+ loading();
7547
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
7548
+ });
7549
+
7550
+ case 3:
7551
+ case "end":
7552
+ return _context7.stop();
7553
+ }
7554
+ }
7555
+ }, _callee7);
7556
+ }));
7557
+
7558
+ function modalOnOk(_x5, _x6) {
7559
+ return _modalOnOk3.apply(this, arguments);
7560
+ }
7561
+
7562
+ return modalOnOk;
7563
+ }()
7564
+ });
7565
+ };
7566
+
7526
7567
  return {
7527
7568
  config: omit(item, ['type', 'actionMethod', 'actionRender']),
7528
- children: /*#__PURE__*/React.createElement(Tooltip, {
7569
+ children: item.actionRender ? item.actionRender({
7570
+ clickHandle: clickHandle
7571
+ }) : /*#__PURE__*/React.createElement(Tooltip, {
7529
7572
  title: "\u65B0\u589E",
7530
7573
  key: "add"
7531
7574
  }, /*#__PURE__*/React.createElement(Button, {
7532
7575
  key: "add",
7533
7576
  type: "primary",
7534
- onClick: function onClick() {
7535
- return openFormModel({
7536
- type: '新增',
7537
- record: {},
7538
- modalOnOk: function () {
7539
- var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
7540
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
7541
- while (1) {
7542
- switch (_context7.prev = _context7.next) {
7543
- case 0:
7544
- if (!item.actionMethod) {
7545
- _context7.next = 3;
7546
- break;
7547
- }
7548
-
7549
- _context7.next = 3;
7550
- return item.actionMethod(values, function () {
7551
- var _actionRef$current4;
7552
-
7553
- loading();
7554
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
7555
- });
7556
-
7557
- case 3:
7558
- case "end":
7559
- return _context7.stop();
7560
- }
7561
- }
7562
- }, _callee7);
7563
- }));
7564
-
7565
- function modalOnOk(_x5, _x6) {
7566
- return _modalOnOk3.apply(this, arguments);
7567
- }
7568
-
7569
- return modalOnOk;
7570
- }()
7571
- });
7572
- }
7577
+ onClick: clickHandle
7573
7578
  }, /*#__PURE__*/React.createElement(PlusOutlined, null), " \u65B0\u589E"))
7574
7579
  };
7575
7580
  } else if (item.type === 'extraAction') {
@@ -12275,7 +12280,8 @@ function NtTable(_ref, ref) {
12275
12280
  }
12276
12281
  }, _callee);
12277
12282
  }))();
12278
- }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
12283
+ }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch // JSON.stringify(columns),
12284
+ ]);
12279
12285
 
12280
12286
  var onFormSubmit = function onFormSubmit(values) {
12281
12287
  var requestParams = {};
package/dist/index.js CHANGED
@@ -4806,7 +4806,8 @@ function Table(_ref) {
4806
4806
  }
4807
4807
  }, _callee);
4808
4808
  }))();
4809
- }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
4809
+ }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch // JSON.stringify(columns),
4810
+ ]);
4810
4811
 
4811
4812
  var onFormSubmit = function onFormSubmit(values) {
4812
4813
  onSubmit && onSubmit(values);
@@ -7567,53 +7568,57 @@ var TabelCard = function TabelCard(props, ref) {
7567
7568
  var tableBarDom = React.useMemo(function () {
7568
7569
  return renderTableBar === null || renderTableBar === void 0 ? void 0 : renderTableBar.map(function (item) {
7569
7570
  if (item.type === 'add') {
7571
+ var clickHandle = function clickHandle() {
7572
+ return openFormModel({
7573
+ type: '新增',
7574
+ record: {},
7575
+ modalOnOk: function () {
7576
+ var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
7577
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
7578
+ while (1) {
7579
+ switch (_context7.prev = _context7.next) {
7580
+ case 0:
7581
+ if (!item.actionMethod) {
7582
+ _context7.next = 3;
7583
+ break;
7584
+ }
7585
+
7586
+ _context7.next = 3;
7587
+ return item.actionMethod(values, function () {
7588
+ var _actionRef$current4;
7589
+
7590
+ loading();
7591
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
7592
+ });
7593
+
7594
+ case 3:
7595
+ case "end":
7596
+ return _context7.stop();
7597
+ }
7598
+ }
7599
+ }, _callee7);
7600
+ }));
7601
+
7602
+ function modalOnOk(_x5, _x6) {
7603
+ return _modalOnOk3.apply(this, arguments);
7604
+ }
7605
+
7606
+ return modalOnOk;
7607
+ }()
7608
+ });
7609
+ };
7610
+
7570
7611
  return {
7571
7612
  config: lodashEs.omit(item, ['type', 'actionMethod', 'actionRender']),
7572
- children: /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
7613
+ children: item.actionRender ? item.actionRender({
7614
+ clickHandle: clickHandle
7615
+ }) : /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
7573
7616
  title: "\u65B0\u589E",
7574
7617
  key: "add"
7575
7618
  }, /*#__PURE__*/React__default['default'].createElement(antd.Button, {
7576
7619
  key: "add",
7577
7620
  type: "primary",
7578
- onClick: function onClick() {
7579
- return openFormModel({
7580
- type: '新增',
7581
- record: {},
7582
- modalOnOk: function () {
7583
- var _modalOnOk3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(values, loading) {
7584
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
7585
- while (1) {
7586
- switch (_context7.prev = _context7.next) {
7587
- case 0:
7588
- if (!item.actionMethod) {
7589
- _context7.next = 3;
7590
- break;
7591
- }
7592
-
7593
- _context7.next = 3;
7594
- return item.actionMethod(values, function () {
7595
- var _actionRef$current4;
7596
-
7597
- loading();
7598
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : _actionRef$current4.reload();
7599
- });
7600
-
7601
- case 3:
7602
- case "end":
7603
- return _context7.stop();
7604
- }
7605
- }
7606
- }, _callee7);
7607
- }));
7608
-
7609
- function modalOnOk(_x5, _x6) {
7610
- return _modalOnOk3.apply(this, arguments);
7611
- }
7612
-
7613
- return modalOnOk;
7614
- }()
7615
- });
7616
- }
7621
+ onClick: clickHandle
7617
7622
  }, /*#__PURE__*/React__default['default'].createElement(icons.PlusOutlined, null), " \u65B0\u589E"))
7618
7623
  };
7619
7624
  } else if (item.type === 'extraAction') {
@@ -12319,7 +12324,8 @@ function NtTable(_ref, ref) {
12319
12324
  }
12320
12325
  }, _callee);
12321
12326
  }))();
12322
- }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
12327
+ }, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch // JSON.stringify(columns),
12328
+ ]);
12323
12329
 
12324
12330
  var onFormSubmit = function onFormSubmit(values) {
12325
12331
  var requestParams = {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.42",
4
+ "version": "0.7.44",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",