cloud-b2b 1.1.77 → 1.1.79

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 +13 -10
  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 +23 -20
  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 +86 -83
  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 +114 -108
  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 +73 -70
  31. package/es/SuperTable2/SuperTable2.js +92 -89
  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 +68 -26
  36. package/es/SuperUpload/SuperUpload.js +63 -53
  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 +13 -10
  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 +23 -20
  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 +88 -84
  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 +116 -109
  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 +73 -70
  71. package/lib/SuperTable2/SuperTable2.js +94 -90
  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 +67 -26
  76. package/lib/SuperUpload/SuperUpload.js +65 -54
  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
@@ -15,13 +15,14 @@ import _Icon from "antd/es/icon";
15
15
  import _extends from "@babel/runtime-corejs3/helpers/extends";
16
16
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
17
17
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
18
+ import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
19
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
18
20
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
19
21
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
20
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
21
22
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
22
23
  var _excluded = ["onRowClick"];
23
24
  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; }
24
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context0 = ownKeys(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context1 = ownKeys(Object(t))).call(_context1, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context10 = ownKeys(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context11 = ownKeys(Object(t))).call(_context11, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
25
26
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
26
27
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
27
28
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
@@ -37,8 +38,8 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
37
38
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
38
39
  import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
39
40
  import _parseFloat from "@babel/runtime-corejs3/core-js-stable/parse-float";
40
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
41
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
41
+ 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); }; }
42
+ 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; } }
42
43
  import React from 'react';
43
44
  import PropTypes from 'prop-types';
44
45
  import ReactDOM from 'react-dom';
@@ -110,6 +111,8 @@ var CallbackType = {
110
111
  * searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
111
112
  */
112
113
  var SuperTable = /*#__PURE__*/function (_React$Component) {
114
+ _inherits(SuperTable, _React$Component);
115
+ var _super = _createSuper(SuperTable);
113
116
  function SuperTable() {
114
117
  var _context;
115
118
  var _this;
@@ -117,18 +120,18 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
117
120
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
118
121
  args[_key] = arguments[_key];
119
122
  }
120
- _this = _callSuper(this, SuperTable, _concatInstanceProperty(_context = []).call(_context, args));
121
- _defineProperty(_this, "state", {
123
+ _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
124
+ _defineProperty(_assertThisInitialized(_this), "state", {
122
125
  filterVisibleKey: ''
123
126
  });
124
- _defineProperty(_this, "onTableChange", function (pagination, filters, sorter) {
127
+ _defineProperty(_assertThisInitialized(_this), "onTableChange", function (pagination, filters, sorter) {
125
128
  var _ref = _this.props.callback || {},
126
129
  onTableChange = _ref.onTableChange;
127
130
  var _this$props$filterInf = _this.props.filterInfo,
128
131
  filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
129
132
  onTableChange && onTableChange(sorter, filterInfo);
130
133
  });
131
- _defineProperty(_this, "onChange", function () {
134
+ _defineProperty(_assertThisInitialized(_this), "onChange", function () {
132
135
  var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
133
136
  var _ref2 = _this.props.callback || {},
134
137
  onCheck = _ref2.onCheck;
@@ -175,22 +178,22 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
175
178
  }
176
179
  }
177
180
  });
178
- _defineProperty(_this, "onCheckChange", function (selectedKeys) {
181
+ _defineProperty(_assertThisInitialized(_this), "onCheckChange", function (selectedKeys) {
179
182
  var _ref3 = _this.props.callback || {},
180
183
  onCheck = _ref3.onCheck;
181
184
  onCheck && onCheck(selectedKeys);
182
185
  });
183
- _defineProperty(_this, "onRadioChange", function (selectedKeys) {
186
+ _defineProperty(_assertThisInitialized(_this), "onRadioChange", function (selectedKeys) {
184
187
  var _ref4 = _this.props.callback || {},
185
188
  onRadio = _ref4.onRadio;
186
189
  onRadio && onRadio(selectedKeys);
187
190
  });
188
- _defineProperty(_this, "onRadioRowClick", function (record) {
191
+ _defineProperty(_assertThisInitialized(_this), "onRadioRowClick", function (record) {
189
192
  var _ref5 = _this.props.callback || {},
190
193
  onRadio = _ref5.onRadio;
191
194
  onRadio && onRadio([record.key]);
192
195
  });
193
- _defineProperty(_this, "onRowClick", function (record) {
196
+ _defineProperty(_assertThisInitialized(_this), "onRowClick", function (record) {
194
197
  var _this$props2 = _this.props,
195
198
  _this$props2$isWeaken = _this$props2.isWeaken,
196
199
  isWeaken = _this$props2$isWeaken === void 0 ? false : _this$props2$isWeaken,
@@ -220,33 +223,33 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
220
223
  }
221
224
  }, 250);
222
225
  });
223
- _defineProperty(_this, "onDoubleClick", function (record) {
226
+ _defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (record) {
224
227
  clearTimeout(_this.timer);
225
228
  var _ref7 = _this.props.callback || {},
226
229
  onDoubleClick = _ref7.onDoubleClick;
227
230
  onDoubleClick && onDoubleClick(record.key);
228
231
  });
229
- _defineProperty(_this, "onLink", function (key, index, item, e) {
232
+ _defineProperty(_assertThisInitialized(_this), "onLink", function (key, index, item, e) {
230
233
  var _ref8 = _this.props.callback || {},
231
234
  onLink = _ref8.onLink;
232
235
  onLink && onLink(key, index, item);
233
236
  e.stopPropagation();
234
237
  });
235
- _defineProperty(_this, "onLinkDouble", function (e) {
238
+ _defineProperty(_assertThisInitialized(_this), "onLinkDouble", function (e) {
236
239
  e.stopPropagation();
237
240
  });
238
- _defineProperty(_this, "onMoveRow", function (dragIndex, targetIndex) {
241
+ _defineProperty(_assertThisInitialized(_this), "onMoveRow", function (dragIndex, targetIndex) {
239
242
  var _ref9 = _this.props.callback || {},
240
243
  onMoveRow = _ref9.onMoveRow;
241
244
  onMoveRow && onMoveRow(dragIndex, targetIndex);
242
245
  });
243
- _defineProperty(_this, "getSelectedRowKeys", function (items) {
246
+ _defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
244
247
  return _reduceInstanceProperty(items).call(items, function (result, item, index) {
245
248
  item.checked && result.push(index);
246
249
  return result;
247
250
  }, []);
248
251
  });
249
- _defineProperty(_this, "getIndexInfo", function () {
252
+ _defineProperty(_assertThisInitialized(_this), "getIndexInfo", function () {
250
253
  var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
251
254
  var _this$props4 = _this.props,
252
255
  _this$props4$index = _this$props4.index,
@@ -261,7 +264,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
261
264
  }
262
265
  }] : [];
263
266
  });
264
- _defineProperty(_this, "setSortInfo", function (col, sortInfo) {
267
+ _defineProperty(_assertThisInitialized(_this), "setSortInfo", function (col, sortInfo) {
265
268
  if (col.sorter === 'string') {
266
269
  col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
267
270
  col.sorter = function (row1, row2) {
@@ -284,13 +287,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
284
287
  delete col.sorter;
285
288
  }
286
289
  });
287
- _defineProperty(_this, "setFilterInfo", function (col, filterInfo, visibleKey) {
290
+ _defineProperty(_assertThisInitialized(_this), "setFilterInfo", function (col, filterInfo, visibleKey) {
288
291
  if (_filterInstanceProperty(col)) {
289
292
  var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
290
293
  isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
291
294
  var onSearch = function onSearch(value) {
292
- var _ref0 = _this.props.callback || {},
293
- onTableChange = _ref0.onTableChange;
295
+ var _ref10 = _this.props.callback || {},
296
+ onTableChange = _ref10.onTableChange;
294
297
  var _this$props$sortInfo = _this.props.sortInfo,
295
298
  sortInfo = _this$props$sortInfo === void 0 ? null : _this$props$sortInfo;
296
299
  var newFilterInfo = _Object$assign({}, filterInfo, _defineProperty({}, col.key, value));
@@ -338,7 +341,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
338
341
  }
339
342
  delete col.filter;
340
343
  });
341
- _defineProperty(_this, "linkList", function (key, index, item) {
344
+ _defineProperty(_assertThisInitialized(_this), "linkList", function (key, index, item) {
342
345
  var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
343
346
  var list = item[key] || [];
344
347
  return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(list).call(list, function (item2, index2) {
@@ -352,7 +355,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
352
355
  }, _concatInstanceProperty(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
353
356
  }));
354
357
  });
355
- _defineProperty(_this, "waring", function (key, index, item, warningKey) {
358
+ _defineProperty(_assertThisInitialized(_this), "waring", function (key, index, item, warningKey) {
356
359
  var text = item[key] ? item[key] : '';
357
360
  var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
358
361
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
@@ -361,7 +364,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
361
364
  }
362
365
  }, text.title ? text.title : text));
363
366
  });
364
- _defineProperty(_this, "defaultList", function (key, index, item, text, link) {
367
+ _defineProperty(_assertThisInitialized(_this), "defaultList", function (key, index, item, text, link) {
365
368
  var _context4;
366
369
  var onClick = _bindInstanceProperty(_context4 = _this.onLink).call(_context4, null, key, index, item);
367
370
  if (link && typeof link === 'string') {
@@ -372,8 +375,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
372
375
  }
373
376
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, text));
374
377
  });
375
- _defineProperty(_this, "tags", function (key, index, item, _ref1) {
376
- var tags = _ref1.tags;
378
+ _defineProperty(_assertThisInitialized(_this), "tags", function (key, index, item, _ref11) {
379
+ var tags = _ref11.tags;
377
380
  var list = item[key] || [];
378
381
  return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(list).call(list, function (item2, index2) {
379
382
  var _context5;
@@ -408,7 +411,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
408
411
  }, /*#__PURE__*/React.createElement(_Tag, tagProps, item2[tags])) : /*#__PURE__*/React.createElement(_Tag, tagProps, item2[tags]);
409
412
  }));
410
413
  });
411
- _defineProperty(_this, "getColumns", function (cols, items) {
414
+ _defineProperty(_assertThisInitialized(_this), "getColumns", function (cols, items) {
412
415
  var _context6, _context7;
413
416
  var _this$props5 = _this.props,
414
417
  sortInfo = _this$props5.sortInfo,
@@ -416,8 +419,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
416
419
  var filterVisibleKey = _this.state.filterVisibleKey;
417
420
  return _mapInstanceProperty(_context6 = _concatInstanceProperty(_context7 = _this.getIndexInfo(items)).call(_context7, _filterInstanceProperty(cols).call(cols, function (col) {
418
421
  return !col.hide;
419
- }))).call(_context6, function (_ref10) {
420
- var col = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
422
+ }))).call(_context6, function (_ref12) {
423
+ var col = _extends({}, (_objectDestructuringEmpty(_ref12), _ref12));
421
424
  col.dataIndex = col.key;
422
425
  col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? variables('SuperTable')[col.align] : '';
423
426
  col.noWrap && (col.className = variables('SuperTable').noWrap);
@@ -455,7 +458,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
455
458
  return col;
456
459
  });
457
460
  });
458
- _defineProperty(_this, "getText", function (value, options) {
461
+ _defineProperty(_assertThisInitialized(_this), "getText", function (value, options) {
459
462
  if (_Array$isArray(value)) {
460
463
  return _mapInstanceProperty(value).call(value, function (v) {
461
464
  return getTitle(v, options);
@@ -464,7 +467,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
464
467
  return getTitle(value, options);
465
468
  }
466
469
  });
467
- _defineProperty(_this, "link", function (key, index, item, text) {
470
+ _defineProperty(_assertThisInitialized(_this), "link", function (key, index, item, text) {
468
471
  var _context8;
469
472
  var onClick = _bindInstanceProperty(_context8 = _this.onLink).call(_context8, null, key, index, item);
470
473
  return /*#__PURE__*/React.createElement("a", {
@@ -472,16 +475,16 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
472
475
  onDoubleClick: _this.onLinkDouble
473
476
  }, text);
474
477
  });
475
- _defineProperty(_this, "tooltip", function (key, index, item, _ref11) {
476
- var tipLen = _ref11.tooltip,
477
- options = _ref11.options;
478
+ _defineProperty(_assertThisInitialized(_this), "tooltip", function (key, index, item, _ref13) {
479
+ var tipLen = _ref13.tooltip,
480
+ options = _ref13.options;
478
481
  var text = _this.getText(item[key], options);
479
482
  var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
480
483
  return needTip ? /*#__PURE__*/React.createElement(_Tooltip, {
481
484
  title: text
482
485
  }, /*#__PURE__*/React.createElement("span", null, _sliceInstanceProperty(text).call(text, 0, tipLen) + '...')) : /*#__PURE__*/React.createElement("span", null, _Array$isArray(text) ? text.join(',') : text);
483
486
  });
484
- _defineProperty(_this, "getImgSrc", function (value, options) {
487
+ _defineProperty(_assertThisInitialized(_this), "getImgSrc", function (value, options) {
485
488
  var index = _findIndexInstanceProperty(options).call(options, function (obj) {
486
489
  return obj.value == value;
487
490
  });
@@ -494,7 +497,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
494
497
  * @param options{array}:字段options
495
498
  * @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
496
499
  */
497
- _defineProperty(_this, "getSourceText", function (item, key, options, dataSource) {
500
+ _defineProperty(_assertThisInitialized(_this), "getSourceText", function (item, key, options, dataSource) {
498
501
  var value = {};
499
502
  if (typeof dataSource === 'string') {
500
503
  value = item[dataSource] || {};
@@ -514,14 +517,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
514
517
  }
515
518
  return _this.getText(value, options);
516
519
  });
517
- _defineProperty(_this, "getDataSource", function (items, cols) {
520
+ _defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
518
521
  return _mapInstanceProperty(items).call(items, function (item, index) {
519
- return _reduceInstanceProperty(cols).call(cols, function (result, _ref12) {
520
- var key = _ref12.key,
521
- options = _ref12.options,
522
- link = _ref12.link,
523
- icon = _ref12.icon,
524
- dataSource = _ref12.dataSource;
522
+ return _reduceInstanceProperty(cols).call(cols, function (result, _ref14) {
523
+ var key = _ref14.key,
524
+ options = _ref14.options,
525
+ link = _ref14.link,
526
+ icon = _ref14.icon,
527
+ dataSource = _ref14.dataSource;
525
528
  if (link) {
526
529
  if (typeof link === 'boolean') {
527
530
  result[key] = _this.link(key, index, item, _this.getText(item[key], options));
@@ -547,7 +550,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
547
550
  });
548
551
  });
549
552
  });
550
- _defineProperty(_this, "getPropsByCheckbox", function (items) {
553
+ _defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function (items) {
551
554
  var _this$props6 = _this.props,
552
555
  _this$props6$checkbox = _this$props6.checkbox,
553
556
  checkbox = _this$props6$checkbox === void 0 ? true : _this$props6$checkbox,
@@ -632,7 +635,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
632
635
  };
633
636
  }
634
637
  });
635
- _defineProperty(_this, "getRowProps", function (onRowClick, items) {
638
+ _defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick, items) {
636
639
  return function (record) {
637
640
  var item = items[record.key];
638
641
  var rowProps = {
@@ -649,7 +652,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
649
652
  return rowProps;
650
653
  };
651
654
  });
652
- _defineProperty(_this, "getRowPropsForDrag", function () {
655
+ _defineProperty(_assertThisInitialized(_this), "getRowPropsForDrag", function () {
653
656
  return function (record, index) {
654
657
  return {
655
658
  index: index,
@@ -657,7 +660,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
657
660
  };
658
661
  };
659
662
  });
660
- _defineProperty(_this, "getItems", function () {
663
+ _defineProperty(_assertThisInitialized(_this), "getItems", function () {
661
664
  var _this$props7 = _this.props,
662
665
  items = _this$props7.items,
663
666
  cols = _this$props7.cols,
@@ -669,10 +672,10 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
669
672
  var resItems = items;
670
673
  if (!dragSort && items.length > 1) {
671
674
  if (pageTotal || searchTotal) {
672
- var totalItem = _reduceInstanceProperty(cols).call(cols, function (result, _ref13) {
673
- var key = _ref13.key,
674
- _ref13$total = _ref13.total,
675
- total = _ref13$total === void 0 ? false : _ref13$total;
675
+ var totalItem = _reduceInstanceProperty(cols).call(cols, function (result, _ref15) {
676
+ var key = _ref15.key,
677
+ _ref15$total = _ref15.total,
678
+ total = _ref15$total === void 0 ? false : _ref15$total;
676
679
  if (total) {
677
680
  result[key] = _parseFloat(Number(_reduceInstanceProperty(items).call(items, function (result, item) {
678
681
  return _parseFloat(String(item[key] || 0)) + result;
@@ -694,7 +697,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
694
697
  }
695
698
  return resItems;
696
699
  });
697
- _defineProperty(_this, "toTotalFooter", function () {
700
+ _defineProperty(_assertThisInitialized(_this), "toTotalFooter", function () {
698
701
  var _this$props8 = _this.props,
699
702
  cols = _this$props8.cols,
700
703
  items = _this$props8.items,
@@ -710,11 +713,11 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
710
713
  return item.checked;
711
714
  });
712
715
  var countItems = checkedItems.length ? checkedItems : items;
713
- var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (_ref14) {
714
- var title = _ref14.title,
715
- key = _ref14.key,
716
- _ref14$props = _ref14.props,
717
- props = _ref14$props === void 0 ? {} : _ref14$props;
716
+ var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (_ref16) {
717
+ var title = _ref16.title,
718
+ key = _ref16.key,
719
+ _ref16$props = _ref16.props,
720
+ props = _ref16$props === void 0 ? {} : _ref16$props;
718
721
  var value = _reduceInstanceProperty(countItems).call(countItems, function (result, item) {
719
722
  return _parseFloat((result + Number(item[key] || 0)).toFixed(props.precision || 6));
720
723
  }, 0);
@@ -732,9 +735,9 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
732
735
  style: {
733
736
  marginRight: "15px"
734
737
  }
735
- }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (_ref15, index) {
736
- var title = _ref15.title,
737
- value = _ref15.value;
738
+ }, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (_ref17, index) {
739
+ var title = _ref17.title,
740
+ value = _ref17.value;
738
741
  return /*#__PURE__*/React.createElement("span", {
739
742
  key: index,
740
743
  style: {
@@ -750,7 +753,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
750
753
  return null;
751
754
  }
752
755
  });
753
- _defineProperty(_this, "getProps", function () {
756
+ _defineProperty(_assertThisInitialized(_this), "getProps", function () {
754
757
  var _this$props9 = _this.props,
755
758
  cols = _this$props9.cols,
756
759
  _this$props9$isPaging = _this$props9.isPaging,
@@ -786,13 +789,13 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
786
789
  }, extraProps);
787
790
  return renderProps;
788
791
  });
789
- _defineProperty(_this, "setScroll", function () {
790
- var _this$props0 = _this.props,
791
- maxHeight = _this$props0.maxHeight,
792
- pageTotal = _this$props0.pageTotal,
793
- searchTotal = _this$props0.searchTotal;
792
+ _defineProperty(_assertThisInitialized(_this), "setScroll", function () {
793
+ var _this$props10 = _this.props,
794
+ maxHeight = _this$props10.maxHeight,
795
+ pageTotal = _this$props10.pageTotal,
796
+ searchTotal = _this$props10.searchTotal;
794
797
  if (maxHeight && _this.getItems().length) {
795
- var root = ReactDOM.findDOMNode(_this);
798
+ var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
796
799
  var container = root.getElementsByClassName('ant-table-body')[0];
797
800
  var header = root.getElementsByClassName('ant-table-thead')[0];
798
801
  var tbody = root.getElementsByClassName('ant-table-tbody')[0];
@@ -807,8 +810,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
807
810
  });
808
811
  return _this;
809
812
  }
810
- _inherits(SuperTable, _React$Component);
811
- return _createClass(SuperTable, [{
813
+ _createClass(SuperTable, [{
812
814
  key: "shouldComponentUpdate",
813
815
  value: function shouldComponentUpdate(props, state) {
814
816
  var _this2 = this;
@@ -835,6 +837,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
835
837
  }));
836
838
  }
837
839
  }]);
840
+ return SuperTable;
838
841
  }(React.Component);
839
842
  _defineProperty(SuperTable, "propTypes", {
840
843
  cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,