cloud-b2b 1.1.64 → 1.1.65

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.
Files changed (80) hide show
  1. package/es/Area/Area.js +11 -8
  2. package/es/CodeInput/CodeInput.js +19 -16
  3. package/es/Enhance/Dialogs.js +14 -11
  4. package/es/Enhance/Loading.js +18 -15
  5. package/es/Header/Header.js +20 -17
  6. package/es/Header/Vertical.js +14 -11
  7. package/es/ImageView/ImageView.js +13 -10
  8. package/es/InpurCascader/InputCascader.js +14 -11
  9. package/es/InputEditor/InputEditor.js +18 -16
  10. package/es/InputSearch/InputSearch.js +22 -19
  11. package/es/InputSelect/InputSelect.js +17 -14
  12. package/es/InputTreeSelect/InputTreeSelect.js +13 -10
  13. package/es/InputWriting/InputWriting.js +15 -12
  14. package/es/Layout/Layout.js +17 -14
  15. package/es/Link/Link.js +10 -7
  16. package/es/NumberInput/NumberInput.js +16 -13
  17. package/es/Search/Search.js +55 -52
  18. package/es/Search2/Search.js +110 -109
  19. package/es/Search2/Search.less +64 -64
  20. package/es/Search2/package.json +6 -6
  21. package/es/Sidebar/Sidebar.js +14 -11
  22. package/es/Sidebar2/Sidebar.js +16 -13
  23. package/es/SuperForm/SuperForm.js +79 -74
  24. package/es/SuperForm2/SuperForm.js +100 -95
  25. package/es/SuperPagination/SuperPagination.js +11 -8
  26. package/es/SuperTab/SuperTab.js +15 -12
  27. package/es/SuperTab2/SuperTab2.js +16 -13
  28. package/es/SuperTable/DragSortRow.js +15 -12
  29. package/es/SuperTable/FilterDropDown.js +14 -11
  30. package/es/SuperTable/SuperTable.js +71 -68
  31. package/es/SuperTable2/SuperTable2.js +88 -85
  32. package/es/SuperTable2/SuperTableCell.js +30 -27
  33. package/es/SuperTable3/FilterDropDown.js +14 -11
  34. package/es/SuperTable3/SuperTable.js +61 -58
  35. package/es/SuperToolbar/SuperToolbar.js +14 -11
  36. package/es/SuperUpload/SuperUpload.js +74 -74
  37. package/es/Viewer/ImageViews.js +19 -16
  38. package/es/Viewer/Viewer.js +14 -11
  39. package/es/helper.js +17 -18
  40. package/lib/Area/Area.js +11 -8
  41. package/lib/CodeInput/CodeInput.js +19 -16
  42. package/lib/Enhance/Dialogs.js +14 -11
  43. package/lib/Enhance/Loading.js +18 -15
  44. package/lib/Header/Header.js +20 -17
  45. package/lib/Header/Vertical.js +14 -11
  46. package/lib/ImageView/ImageView.js +13 -10
  47. package/lib/InpurCascader/InputCascader.js +14 -11
  48. package/lib/InputEditor/InputEditor.js +18 -16
  49. package/lib/InputSearch/InputSearch.js +22 -19
  50. package/lib/InputSelect/InputSelect.js +17 -14
  51. package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
  52. package/lib/InputWriting/InputWriting.js +15 -12
  53. package/lib/Layout/Layout.js +17 -14
  54. package/lib/LayoutLink/LayoutLink.js +2 -1
  55. package/lib/Link/Link.js +10 -7
  56. package/lib/NumberInput/NumberInput.js +16 -13
  57. package/lib/Search/Search.js +57 -53
  58. package/lib/Search2/Search.js +112 -110
  59. package/lib/Search2/Search.less +64 -64
  60. package/lib/Search2/package.json +6 -6
  61. package/lib/Sidebar/Sidebar.js +14 -11
  62. package/lib/Sidebar2/Sidebar.js +16 -13
  63. package/lib/SuperForm/SuperForm.js +81 -75
  64. package/lib/SuperForm2/SuperForm.js +102 -96
  65. package/lib/SuperPagination/SuperPagination.js +11 -8
  66. package/lib/SuperTab/SuperTab.js +15 -12
  67. package/lib/SuperTab2/SuperTab2.js +16 -13
  68. package/lib/SuperTable/DragSortRow.js +15 -12
  69. package/lib/SuperTable/FilterDropDown.js +14 -11
  70. package/lib/SuperTable/SuperTable.js +71 -68
  71. package/lib/SuperTable2/SuperTable2.js +90 -86
  72. package/lib/SuperTable2/SuperTableCell.js +30 -27
  73. package/lib/SuperTable3/FilterDropDown.js +14 -11
  74. package/lib/SuperTable3/SuperTable.js +61 -58
  75. package/lib/SuperToolbar/SuperToolbar.js +14 -11
  76. package/lib/SuperUpload/SuperUpload.js +76 -75
  77. package/lib/Viewer/ImageViews.js +19 -16
  78. package/lib/Viewer/Viewer.js +14 -11
  79. package/lib/helper.js +17 -18
  80. package/package.json +1 -1
@@ -12,13 +12,14 @@ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/objectDest
12
12
  import _extends from "@babel/runtime-corejs3/helpers/extends";
13
13
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
14
14
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
15
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
16
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
15
17
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
16
18
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
17
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
18
19
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
19
20
  var _excluded = ["onRowClick"];
20
21
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context0 = ownKeys(Object(t))).call(_context0, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context9 = ownKeys(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context10 = ownKeys(Object(t))).call(_context10, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
22
23
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
23
24
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
24
25
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -34,8 +35,8 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
34
35
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
35
36
  import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
36
37
  import _parseFloat from "@babel/runtime-corejs3/core-js-stable/parse-float";
37
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
38
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
38
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
39
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
40
  import React from 'react';
40
41
  import PropTypes from 'prop-types';
41
42
  import ReactDOM from 'react-dom';
@@ -105,6 +106,8 @@ var CallbackType = {
105
106
  * searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
106
107
  */
107
108
  var SuperTable = /*#__PURE__*/function (_React$Component) {
109
+ _inherits(SuperTable, _React$Component);
110
+ var _super = _createSuper(SuperTable);
108
111
  function SuperTable() {
109
112
  var _context;
110
113
  var _this;
@@ -112,18 +115,18 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
112
115
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
113
116
  args[_key] = arguments[_key];
114
117
  }
115
- _this = _callSuper(this, SuperTable, _concatInstanceProperty(_context = []).call(_context, args));
116
- _defineProperty(_this, "state", {
118
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
119
+ _defineProperty(_assertThisInitialized(_this), "state", {
117
120
  filterVisibleKey: ''
118
121
  });
119
- _defineProperty(_this, "onTableChange", function (pagination, filters, sorter) {
122
+ _defineProperty(_assertThisInitialized(_this), "onTableChange", function (pagination, filters, sorter) {
120
123
  var _ref = _this.props.callback || {},
121
124
  onTableChange = _ref.onTableChange;
122
125
  var _this$props$filterInf = _this.props.filterInfo,
123
126
  filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
124
127
  onTableChange && onTableChange(sorter, filterInfo);
125
128
  });
126
- _defineProperty(_this, "onChange", function () {
129
+ _defineProperty(_assertThisInitialized(_this), "onChange", function () {
127
130
  var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
128
131
  var _ref2 = _this.props.callback || {},
129
132
  onCheck = _ref2.onCheck;
@@ -170,22 +173,22 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
170
173
  }
171
174
  }
172
175
  });
173
- _defineProperty(_this, "onCheckChange", function (selectedKeys) {
176
+ _defineProperty(_assertThisInitialized(_this), "onCheckChange", function (selectedKeys) {
174
177
  var _ref3 = _this.props.callback || {},
175
178
  onCheck = _ref3.onCheck;
176
179
  onCheck && onCheck(selectedKeys);
177
180
  });
178
- _defineProperty(_this, "onRadioChange", function (selectedKeys) {
181
+ _defineProperty(_assertThisInitialized(_this), "onRadioChange", function (selectedKeys) {
179
182
  var _ref4 = _this.props.callback || {},
180
183
  onRadio = _ref4.onRadio;
181
184
  onRadio && onRadio(selectedKeys);
182
185
  });
183
- _defineProperty(_this, "onRadioRowClick", function (record) {
186
+ _defineProperty(_assertThisInitialized(_this), "onRadioRowClick", function (record) {
184
187
  var _ref5 = _this.props.callback || {},
185
188
  onRadio = _ref5.onRadio;
186
189
  onRadio && onRadio([record.key]);
187
190
  });
188
- _defineProperty(_this, "onRowClick", function (record) {
191
+ _defineProperty(_assertThisInitialized(_this), "onRowClick", function (record) {
189
192
  var _this$props2 = _this.props,
190
193
  _this$props2$isWeaken = _this$props2.isWeaken,
191
194
  isWeaken = _this$props2$isWeaken === void 0 ? false : _this$props2$isWeaken,
@@ -215,33 +218,33 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
215
218
  }
216
219
  }, 250);
217
220
  });
218
- _defineProperty(_this, "onDoubleClick", function (record) {
221
+ _defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (record) {
219
222
  clearTimeout(_this.timer);
220
223
  var _ref7 = _this.props.callback || {},
221
224
  onDoubleClick = _ref7.onDoubleClick;
222
225
  onDoubleClick && onDoubleClick(record.key);
223
226
  });
224
- _defineProperty(_this, "onLink", function (key, index, item, e) {
227
+ _defineProperty(_assertThisInitialized(_this), "onLink", function (key, index, item, e) {
225
228
  var _ref8 = _this.props.callback || {},
226
229
  onLink = _ref8.onLink;
227
230
  onLink && onLink(key, index, item);
228
231
  e.stopPropagation();
229
232
  });
230
- _defineProperty(_this, "onLinkDouble", function (e) {
233
+ _defineProperty(_assertThisInitialized(_this), "onLinkDouble", function (e) {
231
234
  e.stopPropagation();
232
235
  });
233
- _defineProperty(_this, "onMoveRow", function (dragIndex, targetIndex) {
236
+ _defineProperty(_assertThisInitialized(_this), "onMoveRow", function (dragIndex, targetIndex) {
234
237
  var _ref9 = _this.props.callback || {},
235
238
  onMoveRow = _ref9.onMoveRow;
236
239
  onMoveRow && onMoveRow(dragIndex, targetIndex);
237
240
  });
238
- _defineProperty(_this, "getSelectedRowKeys", function (items) {
241
+ _defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
239
242
  return _reduceInstanceProperty(items).call(items, function (result, item, index) {
240
243
  item.checked && result.push(index);
241
244
  return result;
242
245
  }, []);
243
246
  });
244
- _defineProperty(_this, "getIndexInfo", function () {
247
+ _defineProperty(_assertThisInitialized(_this), "getIndexInfo", function () {
245
248
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
246
249
  var _this$props4 = _this.props,
247
250
  _this$props4$index = _this$props4.index,
@@ -256,7 +259,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
256
259
  }
257
260
  }] : [];
258
261
  });
259
- _defineProperty(_this, "setSortInfo", function (col, sortInfo) {
262
+ _defineProperty(_assertThisInitialized(_this), "setSortInfo", function (col, sortInfo) {
260
263
  if (col.sorter === 'string') {
261
264
  col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
262
265
  col.sorter = function (row1, row2) {
@@ -279,13 +282,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
279
282
  delete col.sorter;
280
283
  }
281
284
  });
282
- _defineProperty(_this, "setFilterInfo", function (col, filterInfo, visibleKey) {
285
+ _defineProperty(_assertThisInitialized(_this), "setFilterInfo", function (col, filterInfo, visibleKey) {
283
286
  if (_filterInstanceProperty(col)) {
284
287
  var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
285
288
  isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
286
289
  var onSearch = function onSearch(value) {
287
- var _ref0 = _this.props.callback || {},
288
- onTableChange = _ref0.onTableChange;
290
+ var _ref10 = _this.props.callback || {},
291
+ onTableChange = _ref10.onTableChange;
289
292
  var _this$props$sortInfo = _this.props.sortInfo,
290
293
  sortInfo = _this$props$sortInfo === void 0 ? null : _this$props$sortInfo;
291
294
  var newFilterInfo = _Object$assign({}, filterInfo, _defineProperty({}, col.key, value));
@@ -333,7 +336,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
333
336
  }
334
337
  delete col.filter;
335
338
  });
336
- _defineProperty(_this, "linkList", function (key, index, item) {
339
+ _defineProperty(_assertThisInitialized(_this), "linkList", function (key, index, item) {
337
340
  var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
338
341
  var list = item[key] || [];
339
342
  return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(list).call(list, function (item2, index2) {
@@ -347,7 +350,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
347
350
  }, _concatInstanceProperty(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
348
351
  }));
349
352
  });
350
- _defineProperty(_this, "waring", function (key, index, item, warningKey) {
353
+ _defineProperty(_assertThisInitialized(_this), "waring", function (key, index, item, warningKey) {
351
354
  var text = item[key] ? item[key] : '';
352
355
  var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
353
356
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
@@ -356,7 +359,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
356
359
  }
357
360
  }, text.title ? text.title : text));
358
361
  });
359
- _defineProperty(_this, "defaultList", function (key, index, item, text, link) {
362
+ _defineProperty(_assertThisInitialized(_this), "defaultList", function (key, index, item, text, link) {
360
363
  var _context4;
361
364
  var onClick = _bindInstanceProperty(_context4 = _this.onLink).call(_context4, null, key, index, item);
362
365
  if (link && typeof link === 'string') {
@@ -367,7 +370,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
367
370
  }
368
371
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, text));
369
372
  });
370
- _defineProperty(_this, "getColumns", function (cols, items) {
373
+ _defineProperty(_assertThisInitialized(_this), "getColumns", function (cols, items) {
371
374
  var _context5, _context6;
372
375
  var _this$props5 = _this.props,
373
376
  sortInfo = _this$props5.sortInfo,
@@ -375,8 +378,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
375
378
  var filterVisibleKey = _this.state.filterVisibleKey;
376
379
  return _mapInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _this.getIndexInfo(items)).call(_context6, _filterInstanceProperty(cols).call(cols, function (col) {
377
380
  return !col.hide;
378
- }))).call(_context5, function (_ref1) {
379
- var col = _extends({}, (_objectDestructuringEmpty(_ref1), _ref1));
381
+ }))).call(_context5, function (_ref11) {
382
+ var col = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
380
383
  col.dataIndex = col.key;
381
384
  col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? variables('SuperTable')[col.align] : '';
382
385
  col.noWrap && (col.className = variables('SuperTable').noWrap);
@@ -406,7 +409,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
406
409
  return col;
407
410
  });
408
411
  });
409
- _defineProperty(_this, "getText", function (value, options) {
412
+ _defineProperty(_assertThisInitialized(_this), "getText", function (value, options) {
410
413
  if (_Array$isArray(value)) {
411
414
  return _mapInstanceProperty(value).call(value, function (v) {
412
415
  return getTitle(v, options);
@@ -415,7 +418,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
415
418
  return getTitle(value, options);
416
419
  }
417
420
  });
418
- _defineProperty(_this, "link", function (key, index, item, text) {
421
+ _defineProperty(_assertThisInitialized(_this), "link", function (key, index, item, text) {
419
422
  var _context7;
420
423
  var onClick = _bindInstanceProperty(_context7 = _this.onLink).call(_context7, null, key, index, item);
421
424
  return /*#__PURE__*/React.createElement("a", {
@@ -423,16 +426,16 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
423
426
  onDoubleClick: _this.onLinkDouble
424
427
  }, text);
425
428
  });
426
- _defineProperty(_this, "tooltip", function (key, index, item, _ref10) {
427
- var tipLen = _ref10.tooltip,
428
- options = _ref10.options;
429
+ _defineProperty(_assertThisInitialized(_this), "tooltip", function (key, index, item, _ref12) {
430
+ var tipLen = _ref12.tooltip,
431
+ options = _ref12.options;
429
432
  var text = _this.getText(item[key], options);
430
433
  var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
431
434
  return needTip ? /*#__PURE__*/React.createElement(_Tooltip, {
432
435
  title: text
433
436
  }, /*#__PURE__*/React.createElement("span", null, _sliceInstanceProperty(text).call(text, 0, tipLen) + '...')) : /*#__PURE__*/React.createElement("span", null, _Array$isArray(text) ? text.join(',') : text);
434
437
  });
435
- _defineProperty(_this, "getImgSrc", function (value, options) {
438
+ _defineProperty(_assertThisInitialized(_this), "getImgSrc", function (value, options) {
436
439
  var index = _findIndexInstanceProperty(options).call(options, function (obj) {
437
440
  return obj.value == value;
438
441
  });
@@ -445,7 +448,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
445
448
  * @param options{array}:字段options
446
449
  * @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
447
450
  */
448
- _defineProperty(_this, "getSourceText", function (item, key, options, dataSource) {
451
+ _defineProperty(_assertThisInitialized(_this), "getSourceText", function (item, key, options, dataSource) {
449
452
  var value = {};
450
453
  if (typeof dataSource === 'string') {
451
454
  value = item[dataSource] || {};
@@ -465,14 +468,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
465
468
  }
466
469
  return _this.getText(value, options);
467
470
  });
468
- _defineProperty(_this, "getDataSource", function (items, cols) {
471
+ _defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
469
472
  return _mapInstanceProperty(items).call(items, function (item, index) {
470
- return _reduceInstanceProperty(cols).call(cols, function (result, _ref11) {
471
- var key = _ref11.key,
472
- options = _ref11.options,
473
- link = _ref11.link,
474
- icon = _ref11.icon,
475
- dataSource = _ref11.dataSource;
473
+ return _reduceInstanceProperty(cols).call(cols, function (result, _ref13) {
474
+ var key = _ref13.key,
475
+ options = _ref13.options,
476
+ link = _ref13.link,
477
+ icon = _ref13.icon,
478
+ dataSource = _ref13.dataSource;
476
479
  if (link) {
477
480
  if (typeof link === 'boolean') {
478
481
  result[key] = _this.link(key, index, item, _this.getText(item[key], options));
@@ -498,7 +501,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
498
501
  });
499
502
  });
500
503
  });
501
- _defineProperty(_this, "getPropsByCheckbox", function (items) {
504
+ _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function (items) {
502
505
  var _this$props6 = _this.props,
503
506
  _this$props6$checkbox = _this$props6.checkbox,
504
507
  checkbox = _this$props6$checkbox === void 0 ? true : _this$props6$checkbox,
@@ -583,7 +586,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
583
586
  };
584
587
  }
585
588
  });
586
- _defineProperty(_this, "getRowProps", function (onRowClick) {
589
+ _defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick) {
587
590
  return function (record) {
588
591
  return {
589
592
  onClick: function onClick() {
@@ -595,7 +598,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
595
598
  };
596
599
  };
597
600
  });
598
- _defineProperty(_this, "getRowPropsForDrag", function () {
601
+ _defineProperty(_assertThisInitialized(_this), "getRowPropsForDrag", function () {
599
602
  return function (record, index) {
600
603
  return {
601
604
  index: index,
@@ -603,7 +606,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
603
606
  };
604
607
  };
605
608
  });
606
- _defineProperty(_this, "getItems", function () {
609
+ _defineProperty(_assertThisInitialized(_this), "getItems", function () {
607
610
  var _this$props7 = _this.props,
608
611
  items = _this$props7.items,
609
612
  cols = _this$props7.cols,
@@ -615,10 +618,10 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
615
618
  var resItems = items;
616
619
  if (!dragSort && items.length > 1) {
617
620
  if (pageTotal || searchTotal) {
618
- var totalItem = _reduceInstanceProperty(cols).call(cols, function (result, _ref12) {
619
- var key = _ref12.key,
620
- _ref12$total = _ref12.total,
621
- total = _ref12$total === void 0 ? false : _ref12$total;
621
+ var totalItem = _reduceInstanceProperty(cols).call(cols, function (result, _ref14) {
622
+ var key = _ref14.key,
623
+ _ref14$total = _ref14.total,
624
+ total = _ref14$total === void 0 ? false : _ref14$total;
622
625
  if (total) {
623
626
  result[key] = _parseFloat(Number(_reduceInstanceProperty(items).call(items, function (result, item) {
624
627
  return _parseFloat(String(item[key] || 0)) + result;
@@ -640,7 +643,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
640
643
  }
641
644
  return resItems;
642
645
  });
643
- _defineProperty(_this, "toTotalFooter", function () {
646
+ _defineProperty(_assertThisInitialized(_this), "toTotalFooter", function () {
644
647
  var _this$props8 = _this.props,
645
648
  cols = _this$props8.cols,
646
649
  items = _this$props8.items,
@@ -656,11 +659,11 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
656
659
  return item.checked;
657
660
  });
658
661
  var countItems = checkedItems.length ? checkedItems : items;
659
- var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (_ref13) {
660
- var title = _ref13.title,
661
- key = _ref13.key,
662
- _ref13$props = _ref13.props,
663
- props = _ref13$props === void 0 ? {} : _ref13$props;
662
+ var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (_ref15) {
663
+ var title = _ref15.title,
664
+ key = _ref15.key,
665
+ _ref15$props = _ref15.props,
666
+ props = _ref15$props === void 0 ? {} : _ref15$props;
664
667
  var value = _reduceInstanceProperty(countItems).call(countItems, function (result, item) {
665
668
  return _parseFloat((result + Number(item[key] || 0)).toFixed(props.precision || 6));
666
669
  }, 0);
@@ -678,9 +681,9 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
678
681
  style: {
679
682
  marginRight: "15px"
680
683
  }
681
- }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (_ref14, index) {
682
- var title = _ref14.title,
683
- value = _ref14.value;
684
+ }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (_ref16, index) {
685
+ var title = _ref16.title,
686
+ value = _ref16.value;
684
687
  return /*#__PURE__*/React.createElement("span", {
685
688
  key: index,
686
689
  style: {
@@ -696,7 +699,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
696
699
  return null;
697
700
  }
698
701
  });
699
- _defineProperty(_this, "getProps", function () {
702
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
700
703
  var _this$props9 = _this.props,
701
704
  cols = _this$props9.cols,
702
705
  _this$props9$isPaging = _this$props9.isPaging,
@@ -732,13 +735,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
732
735
  }, extraProps);
733
736
  return renderProps;
734
737
  });
735
- _defineProperty(_this, "setScroll", function () {
736
- var _this$props0 = _this.props,
737
- maxHeight = _this$props0.maxHeight,
738
- pageTotal = _this$props0.pageTotal,
739
- searchTotal = _this$props0.searchTotal;
738
+ _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
739
+ var _this$props10 = _this.props,
740
+ maxHeight = _this$props10.maxHeight,
741
+ pageTotal = _this$props10.pageTotal,
742
+ searchTotal = _this$props10.searchTotal;
740
743
  if (maxHeight && _this.getItems().length) {
741
- var root = ReactDOM.findDOMNode(_this);
744
+ var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
742
745
  var container = root.getElementsByClassName('ant-table-body')[0];
743
746
  var header = root.getElementsByClassName('ant-table-thead')[0];
744
747
  var tbody = root.getElementsByClassName('ant-table-tbody')[0];
@@ -753,8 +756,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
753
756
  });
754
757
  return _this;
755
758
  }
756
- _inherits(SuperTable, _React$Component);
757
- return _createClass(SuperTable, [{
759
+ _createClass(SuperTable, [{
758
760
  key: "shouldComponentUpdate",
759
761
  value: function shouldComponentUpdate(props, state) {
760
762
  var _this2 = this;
@@ -781,6 +783,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
781
783
  }));
782
784
  }
783
785
  }]);
786
+ return SuperTable;
784
787
  }(React.Component);
785
788
  _defineProperty(SuperTable, "propTypes", {
786
789
  cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,