@lemon-fe/kits 1.1.6 → 1.1.7

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.
@@ -45,7 +45,7 @@ interface Props<RecordType extends Record<string, any> = Record<string, any>, Re
45
45
  /**
46
46
  * @description 弹窗关闭前的检验,返回true校验通过关闭弹窗,false校验不通过
47
47
  */
48
- onBeforeClose?: (results: Map<Key, Result<ResultType>>) => Promise<boolean>;
48
+ onBeforeClose?: (results: Map<Key, Result<ResultType>>, datas: RecordType[]) => Promise<boolean>;
49
49
  /**
50
50
  * @description 自定义渲染结果,不要依赖上下文
51
51
  * @param params
@@ -53,11 +53,12 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
53
53
  return String(result !== null && result !== void 0 ? result : '').toString();
54
54
  });
55
55
  _defineProperty(_assertThisInitialized(_this), "handleClose", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
56
- var _this$props, onBeforeClose, onClose, results, value;
56
+ var _this$props, onBeforeClose, onClose, data, results, value;
57
57
  return _regeneratorRuntime().wrap(function _callee$(_context) {
58
58
  while (1) switch (_context.prev = _context.next) {
59
59
  case 0:
60
60
  _this$props = _this.props, onBeforeClose = _this$props.onBeforeClose, onClose = _this$props.onClose;
61
+ data = _this.state.data;
61
62
  results = new Map();
62
63
  _toConsumableArray(_this.state.results).forEach(function (_ref2) {
63
64
  var _ref3 = _slicedToArray(_ref2, 2),
@@ -70,20 +71,20 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
70
71
  });
71
72
  _context.t0 = onBeforeClose;
72
73
  if (!_context.t0) {
73
- _context.next = 8;
74
+ _context.next = 9;
74
75
  break;
75
76
  }
76
- _context.next = 7;
77
- return onBeforeClose(results);
78
- case 7:
79
- _context.t0 = !_context.sent;
77
+ _context.next = 8;
78
+ return onBeforeClose(results, data);
80
79
  case 8:
80
+ _context.t0 = !_context.sent;
81
+ case 9:
81
82
  if (!_context.t0) {
82
- _context.next = 10;
83
+ _context.next = 11;
83
84
  break;
84
85
  }
85
86
  return _context.abrupt("return");
86
- case 10:
87
+ case 11:
87
88
  _this.setState({
88
89
  open: false
89
90
  });
@@ -97,7 +98,7 @@ var BatchOperate = /*#__PURE__*/function (_Component) {
97
98
  results: results
98
99
  });
99
100
  }
100
- case 12:
101
+ case 13:
101
102
  case "end":
102
103
  return _context.stop();
103
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "registry": "https://registry.npmjs.org"
46
46
  },
47
- "gitHead": "c7d4df34f076bd59e43ec432dfd824c89a215cdc"
47
+ "gitHead": "3452fd6674ba79f67ebc3c0b4da2d5154bdb33b0"
48
48
  }