cloud-b2b 1.1.46 → 1.1.51
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/package.json +44 -22
- package/src/Area/Area.js +94 -0
- package/src/Card/Card.js +16 -0
- package/src/CodeInput/CodeInput.js +76 -0
- package/src/Control/Control.js +338 -0
- package/src/Control/event.js +45 -0
- package/src/Enhance/Dialogs.js +24 -0
- package/src/Enhance/Loading.js +83 -0
- package/{es → src}/Enhance/index.js +8 -6
- package/src/Header/Header.js +149 -0
- package/src/Header/Vertical.js +74 -0
- package/src/ImageView/ImageView.js +62 -0
- package/src/Indent/Indent.js +12 -0
- package/src/InpurCascader/InputCascader.js +83 -0
- package/src/InputEditor/InputEditor.js +93 -0
- package/src/InputSearch/InputSearch.js +186 -0
- package/src/InputSelect/InputSelect.js +103 -0
- package/src/InputTreeSelect/InputTreeSelect.js +87 -0
- package/src/InputTreeSelect/package.json +6 -0
- package/src/InputWriting/InputWriting.js +65 -0
- package/src/Layout/Layout.js +121 -0
- package/src/LayoutLink/LayoutLink.js +59 -0
- package/src/Link/Link.js +57 -0
- package/src/Loading/Loading.js +15 -0
- package/src/Loading2/Loading2.js +15 -0
- package/src/ModalWithDrag/ModalWithDrag.js +17 -0
- package/{es → src}/ModalWithDrag/drag.js +128 -116
- package/src/NumberInput/NumberInput.js +137 -0
- package/src/Search/Search.js +368 -0
- package/src/Sidebar/Sidebar.js +111 -0
- package/src/Sidebar2/Sidebar.js +143 -0
- package/src/SuperForm/SuperForm.js +516 -0
- package/src/SuperForm2/SuperForm.js +588 -0
- package/src/SuperIcon/SuperIcon.js +14 -0
- package/src/SuperPagination/SuperPagination.js +65 -0
- package/src/SuperTab/SuperTab.js +84 -0
- package/src/SuperTab2/SuperTab2.js +94 -0
- package/src/SuperTable/DragSortRow.js +62 -0
- package/src/SuperTable/FilterDropDown.js +111 -0
- package/src/SuperTable/SuperTable.js +590 -0
- package/src/SuperTable/fixed.js +34 -0
- package/src/SuperTable2/SuperTable2.js +600 -0
- package/src/SuperTable2/SuperTableCell.js +144 -0
- package/src/SuperTable3/FilterDropDown.js +111 -0
- package/src/SuperTable3/SuperTable.js +498 -0
- package/src/SuperTable3/fixed.js +34 -0
- package/src/SuperToolbar/SuperToolbar.js +128 -0
- package/src/SuperUpload/SuperUpload.js +137 -0
- package/src/Title/Title.js +18 -0
- package/src/Viewer/ImageViews.js +220 -0
- package/src/Viewer/Viewer.js +97 -0
- package/src/WingBlank/WingBlank.js +14 -0
- package/src/helper.js +185 -0
- package/{es → src}/history.js +6 -6
- package/src/index.js +38 -0
- package/src/variables.js +5 -0
- package/test/index.html +10 -0
- package/test/test.js +16 -0
- package/test/test.less +12 -0
- package/test/webpack.config.js +71 -0
- package/tools/babel.config.js +14 -0
- package/tools/build.js +70 -0
- package/tools/publish.js +9 -0
- package/tools/util.js +53 -0
- package/es/Area/Area.js +0 -141
- package/es/Card/Card.js +0 -19
- package/es/CodeInput/CodeInput.js +0 -123
- package/es/Control/Control.js +0 -437
- package/es/Control/event.js +0 -43
- package/es/Enhance/Dialogs.js +0 -52
- package/es/Enhance/Loading.js +0 -131
- package/es/Header/Header.js +0 -162
- package/es/Header/Vertical.js +0 -106
- package/es/ImageView/ImageView.js +0 -100
- package/es/Indent/Indent.js +0 -19
- package/es/InpurCascader/InputCascader.js +0 -109
- package/es/InputEditor/InputEditor.js +0 -114
- package/es/InputSearch/InputSearch.js +0 -266
- package/es/InputSelect/InputSelect.js +0 -160
- package/es/InputWriting/InputWriting.js +0 -85
- package/es/Layout/Layout.js +0 -201
- package/es/LayoutLink/LayoutLink.js +0 -73
- package/es/Link/Link.js +0 -85
- package/es/Loading/Loading.js +0 -13
- package/es/Loading2/Loading2.js +0 -9
- package/es/ModalWithDrag/ModalWithDrag.js +0 -29
- package/es/NumberInput/NumberInput.js +0 -200
- package/es/Search/Search.js +0 -485
- package/es/Sidebar/Sidebar.js +0 -144
- package/es/Sidebar2/Sidebar.js +0 -165
- package/es/SuperForm/SuperForm.js +0 -583
- package/es/SuperForm2/SuperForm.js +0 -677
- package/es/SuperIcon/SuperIcon.js +0 -27
- package/es/SuperPagination/SuperPagination.js +0 -109
- package/es/SuperTab/SuperTab.js +0 -107
- package/es/SuperTab2/SuperTab2.js +0 -145
- package/es/SuperTable/DragSortRow.js +0 -97
- package/es/SuperTable/FilterDropDown.js +0 -164
- package/es/SuperTable/SuperTable.js +0 -808
- package/es/SuperTable/fixed.js +0 -34
- package/es/SuperTable2/SuperTable2.js +0 -894
- package/es/SuperTable2/SuperTableCell.js +0 -198
- package/es/SuperTable3/FilterDropDown.js +0 -164
- package/es/SuperTable3/SuperTable.js +0 -665
- package/es/SuperTable3/fixed.js +0 -34
- package/es/SuperToolbar/SuperToolbar.js +0 -195
- package/es/SuperUpload/SuperUpload.js +0 -357
- package/es/Title/Title.js +0 -33
- package/es/Viewer/ImageViews.js +0 -258
- package/es/Viewer/Viewer.js +0 -122
- package/es/WingBlank/WingBlank.js +0 -16
- package/es/helper.js +0 -147
- package/es/index.js +0 -37
- package/es/variables.js +0 -4
- package/lib/Area/Area.js +0 -150
- package/lib/Area/package.json +0 -6
- package/lib/Card/Card.js +0 -28
- package/lib/Card/package.json +0 -6
- package/lib/CodeInput/CodeInput.js +0 -132
- package/lib/CodeInput/package.json +0 -6
- package/lib/Control/Control.js +0 -446
- package/lib/Control/event.js +0 -52
- package/lib/Control/package.json +0 -6
- package/lib/Enhance/Dialogs.js +0 -61
- package/lib/Enhance/Loading.js +0 -139
- package/lib/Enhance/index.js +0 -26
- package/lib/Enhance/package.json +0 -6
- package/lib/Header/Header.js +0 -170
- package/lib/Header/Header.less +0 -95
- package/lib/Header/Vertical.js +0 -115
- package/lib/Header/Vertical.less +0 -60
- package/lib/Header/package.json +0 -6
- package/lib/ImageView/ImageView.js +0 -109
- package/lib/ImageView/ImageView.less +0 -14
- package/lib/ImageView/package.json +0 -6
- package/lib/Indent/Indent.js +0 -28
- package/lib/Indent/package.json +0 -6
- package/lib/InpurCascader/InputCascader.js +0 -117
- package/lib/InpurCascader/package.json +0 -6
- package/lib/InputEditor/InputEditor.js +0 -123
- package/lib/InputEditor/inputEditor.less +0 -8
- package/lib/InputEditor/package.json +0 -6
- package/lib/InputSearch/InputSearch.js +0 -275
- package/lib/InputSearch/package.json +0 -6
- package/lib/InputSelect/InputSelect.js +0 -169
- package/lib/InputSelect/package.json +0 -6
- package/lib/InputWriting/InputWriting.js +0 -94
- package/lib/InputWriting/package.json +0 -6
- package/lib/Layout/Layout.js +0 -210
- package/lib/Layout/Layout.less +0 -28
- package/lib/Layout/package.json +0 -6
- package/lib/LayoutLink/LayoutLink.js +0 -87
- package/lib/LayoutLink/LayoutLink.less +0 -53
- package/lib/LayoutLink/package.json +0 -6
- package/lib/Link/Link.js +0 -94
- package/lib/Link/package.json +0 -6
- package/lib/Loading/Loading.js +0 -22
- package/lib/Loading/Loading.less +0 -13
- package/lib/Loading/package.json +0 -6
- package/lib/Loading2/Loading2.js +0 -18
- package/lib/Loading2/Loading2.less +0 -19
- package/lib/Loading2/package.json +0 -6
- package/lib/ModalWithDrag/ModalWithDrag.js +0 -38
- package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
- package/lib/ModalWithDrag/drag.js +0 -125
- package/lib/ModalWithDrag/package.json +0 -6
- package/lib/NumberInput/NumberInput.js +0 -209
- package/lib/NumberInput/package.json +0 -6
- package/lib/Search/Search.js +0 -499
- package/lib/Search/Search.less +0 -63
- package/lib/Search/package.json +0 -6
- package/lib/Sidebar/Sidebar.js +0 -153
- package/lib/Sidebar/Sidebar.less +0 -78
- package/lib/Sidebar/package.json +0 -6
- package/lib/Sidebar2/Sidebar.js +0 -174
- package/lib/Sidebar2/Sidebar.less +0 -153
- package/lib/Sidebar2/package.json +0 -6
- package/lib/SuperForm/SuperForm.js +0 -596
- package/lib/SuperForm/SuperForm.less +0 -52
- package/lib/SuperForm/package.json +0 -6
- package/lib/SuperForm2/SuperForm.js +0 -690
- package/lib/SuperForm2/SuperForm.less +0 -52
- package/lib/SuperForm2/package.json +0 -6
- package/lib/SuperIcon/SuperIcon.js +0 -36
- package/lib/SuperIcon/package.json +0 -6
- package/lib/SuperPagination/SuperPagination.js +0 -118
- package/lib/SuperPagination/package.json +0 -6
- package/lib/SuperTab/SuperTab.js +0 -116
- package/lib/SuperTab/SuperTab.less +0 -43
- package/lib/SuperTab/package.json +0 -6
- package/lib/SuperTab2/SuperTab2.js +0 -154
- package/lib/SuperTab2/SuperTab2.less +0 -18
- package/lib/SuperTab2/package.json +0 -6
- package/lib/SuperTable/DragSortRow.js +0 -106
- package/lib/SuperTable/DragSortRow.less +0 -17
- package/lib/SuperTable/FilterDropDown.js +0 -173
- package/lib/SuperTable/FilterDropDown.less +0 -30
- package/lib/SuperTable/SuperTable.js +0 -817
- package/lib/SuperTable/SuperTable.less +0 -132
- package/lib/SuperTable/fixed.js +0 -43
- package/lib/SuperTable/package.json +0 -6
- package/lib/SuperTable2/SuperTable2.js +0 -908
- package/lib/SuperTable2/SuperTable2.less +0 -118
- package/lib/SuperTable2/SuperTableCell.js +0 -204
- package/lib/SuperTable2/package.json +0 -6
- package/lib/SuperTable3/FilterDropDown.js +0 -173
- package/lib/SuperTable3/FilterDropDown.less +0 -29
- package/lib/SuperTable3/SuperTable.js +0 -674
- package/lib/SuperTable3/SuperTable.less +0 -99
- package/lib/SuperTable3/fixed.js +0 -43
- package/lib/SuperTable3/package.json +0 -6
- package/lib/SuperToolbar/SuperToolbar.js +0 -204
- package/lib/SuperToolbar/SuperToolbar.less +0 -17
- package/lib/SuperToolbar/package.json +0 -6
- package/lib/SuperUpload/SuperUpload.js +0 -370
- package/lib/SuperUpload/SuperUpload.less +0 -28
- package/lib/SuperUpload/package.json +0 -6
- package/lib/Title/Title.js +0 -42
- package/lib/Title/Title.less +0 -35
- package/lib/Title/package.json +0 -6
- package/lib/Viewer/ImageViews.js +0 -267
- package/lib/Viewer/Viewer.js +0 -131
- package/lib/Viewer/Viewer.less +0 -67
- package/lib/Viewer/imgView.less +0 -59
- package/lib/Viewer/package.json +0 -7
- package/lib/WingBlank/WingBlank.js +0 -25
- package/lib/WingBlank/WingBlank.less +0 -12
- package/lib/WingBlank/package.json +0 -6
- package/lib/adjust.less +0 -89
- package/lib/helper.js +0 -163
- package/lib/history.js +0 -13
- package/lib/index.js +0 -271
- package/lib/index.less +0 -31
- package/lib/style.less +0 -30
- package/lib/variables.js +0 -12
- package/lib/variables.less +0 -73
- /package/{es → src}/Area/package.json +0 -0
- /package/{es → src}/Card/package.json +0 -0
- /package/{es → src}/CodeInput/package.json +0 -0
- /package/{es → src}/Control/package.json +0 -0
- /package/{es → src}/Enhance/package.json +0 -0
- /package/{es → src}/Header/Header.less +0 -0
- /package/{es → src}/Header/Vertical.less +0 -0
- /package/{es → src}/Header/package.json +0 -0
- /package/{es → src}/ImageView/ImageView.less +0 -0
- /package/{es → src}/ImageView/package.json +0 -0
- /package/{es → src}/Indent/package.json +0 -0
- /package/{es → src}/InpurCascader/package.json +0 -0
- /package/{es → src}/InputEditor/inputEditor.less +0 -0
- /package/{es → src}/InputEditor/package.json +0 -0
- /package/{es → src}/InputSearch/package.json +0 -0
- /package/{es → src}/InputSelect/package.json +0 -0
- /package/{es → src}/InputWriting/package.json +0 -0
- /package/{es → src}/Layout/Layout.less +0 -0
- /package/{es → src}/Layout/package.json +0 -0
- /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
- /package/{es → src}/LayoutLink/package.json +0 -0
- /package/{es → src}/Link/package.json +0 -0
- /package/{es → src}/Loading/Loading.less +0 -0
- /package/{es → src}/Loading/package.json +0 -0
- /package/{es → src}/Loading2/Loading2.less +0 -0
- /package/{es → src}/Loading2/package.json +0 -0
- /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
- /package/{es → src}/ModalWithDrag/package.json +0 -0
- /package/{es → src}/NumberInput/package.json +0 -0
- /package/{es → src}/Search/Search.less +0 -0
- /package/{es → src}/Search/package.json +0 -0
- /package/{es → src}/Sidebar/Sidebar.less +0 -0
- /package/{es → src}/Sidebar/package.json +0 -0
- /package/{es → src}/Sidebar2/Sidebar.less +0 -0
- /package/{es → src}/Sidebar2/package.json +0 -0
- /package/{es → src}/SuperForm/SuperForm.less +0 -0
- /package/{es → src}/SuperForm/package.json +0 -0
- /package/{es → src}/SuperForm2/SuperForm.less +0 -0
- /package/{es → src}/SuperForm2/package.json +0 -0
- /package/{es → src}/SuperIcon/package.json +0 -0
- /package/{es → src}/SuperPagination/package.json +0 -0
- /package/{es → src}/SuperTab/SuperTab.less +0 -0
- /package/{es → src}/SuperTab/package.json +0 -0
- /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
- /package/{es → src}/SuperTab2/package.json +0 -0
- /package/{es → src}/SuperTable/DragSortRow.less +0 -0
- /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable/SuperTable.less +0 -0
- /package/{es → src}/SuperTable/package.json +0 -0
- /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
- /package/{es → src}/SuperTable2/package.json +0 -0
- /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
- /package/{es → src}/SuperTable3/SuperTable.less +0 -0
- /package/{es → src}/SuperTable3/package.json +0 -0
- /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
- /package/{es → src}/SuperToolbar/package.json +0 -0
- /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
- /package/{es → src}/SuperUpload/package.json +0 -0
- /package/{es → src}/Title/Title.less +0 -0
- /package/{es → src}/Title/package.json +0 -0
- /package/{es → src}/Viewer/Viewer.less +0 -0
- /package/{es → src}/Viewer/imgView.less +0 -0
- /package/{es → src}/Viewer/package.json +0 -0
- /package/{es → src}/WingBlank/WingBlank.less +0 -0
- /package/{es → src}/WingBlank/package.json +0 -0
- /package/{es → src}/adjust.less +0 -0
- /package/{es → src}/style.less +0 -0
- /package/{es → src}/variables.less +0 -0
|
@@ -1,817 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
4
|
-
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
|
5
|
-
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
|
6
|
-
var _filterInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
|
7
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
8
|
-
var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
9
|
-
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
|
10
|
-
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
|
11
|
-
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
12
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
13
|
-
_Object$defineProperty(exports, "__esModule", {
|
|
14
|
-
value: true
|
|
15
|
-
});
|
|
16
|
-
exports["default"] = void 0;
|
|
17
|
-
var _table = _interopRequireDefault(require("antd/lib/table"));
|
|
18
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
19
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
20
|
-
var _slice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/slice"));
|
|
21
|
-
var _filter = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/filter"));
|
|
22
|
-
var _every = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/every"));
|
|
23
|
-
var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
|
|
24
|
-
var _some = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/some"));
|
|
25
|
-
var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/set-timeout"));
|
|
26
|
-
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
27
|
-
var _reduce = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/reduce"));
|
|
28
|
-
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
|
29
|
-
var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
|
|
30
|
-
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
31
|
-
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
32
|
-
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
|
33
|
-
var _parseFloat2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-float"));
|
|
34
|
-
var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
|
|
35
|
-
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectDestructuringEmpty"));
|
|
36
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
37
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
38
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
39
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
40
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
41
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
42
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
43
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
44
|
-
var _react = _interopRequireDefault(require("react"));
|
|
45
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
46
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
47
|
-
var _Control = require("../Control");
|
|
48
|
-
var _FilterDropDown = _interopRequireDefault(require("./FilterDropDown"));
|
|
49
|
-
var _fixed = _interopRequireDefault(require("./fixed"));
|
|
50
|
-
var _DragSortRow = _interopRequireDefault(require("./DragSortRow"));
|
|
51
|
-
var _variables = _interopRequireDefault(require("../variables"));
|
|
52
|
-
var _excluded = ["onRowClick"];
|
|
53
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty2(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
54
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context9, _context10; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty2(_context9 = ownKeys(Object(source), !0)).call(_context9, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty2(_context10 = ownKeys(Object(source))).call(_context10, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
55
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
56
|
-
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; } }
|
|
57
|
-
/**
|
|
58
|
-
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
59
|
-
* filter: [可选],是否支持过滤,默认为false
|
|
60
|
-
* link: [可选],为true表示超链接,内容来至items;为字符串表示超链接,内容就是该字符串;为字符串‘list’表示超链接数组,内容就是该items对应key对象数组的linkTitleKey属性拼接
|
|
61
|
-
* linkTitleKey: [可选],当link为'list'表示超链接组时,该值表示要拼接展示的属性key值
|
|
62
|
-
* isDateFilterByStartAndEnd: [可选],为true时做过滤操作会显示时间段搜索,默认为false
|
|
63
|
-
*
|
|
64
|
-
*/
|
|
65
|
-
var ColType = {
|
|
66
|
-
key: _propTypes["default"].string.isRequired,
|
|
67
|
-
title: _propTypes["default"].string,
|
|
68
|
-
align: _propTypes["default"].oneOf(['left', 'center', 'right']),
|
|
69
|
-
sorter: _propTypes["default"].oneOf(['string', 'number']),
|
|
70
|
-
filter: _propTypes["default"].bool,
|
|
71
|
-
hide: _propTypes["default"].bool,
|
|
72
|
-
options: _propTypes["default"].array,
|
|
73
|
-
link: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].string]),
|
|
74
|
-
linkTitleKey: _propTypes["default"].string,
|
|
75
|
-
noWrap: _propTypes["default"].bool,
|
|
76
|
-
isDateFilterByStartAndEnd: _propTypes["default"].bool
|
|
77
|
-
};
|
|
78
|
-
var ItemType = {
|
|
79
|
-
checked: _propTypes["default"].bool
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* onCheck:点击复选框时触发,原型func(isAll, checked, rowIndex);isolation为true时,原型为onCheck(checkedRows)
|
|
84
|
-
* onRadio: 点击单选按钮时触发,原型为func(checkedRows)
|
|
85
|
-
* onDoubleClick: 行双击时触发,原型func(rowIndex)
|
|
86
|
-
* onLink: 点击超链接时触发,原型为func(key, rowIndex, item)
|
|
87
|
-
* onTableChange: 排序信息改变时触发,原型为func(sortInfo, filterInfo)
|
|
88
|
-
* onMoveRow:行拖曳排序时触发,原型为func(dragIndex, targetIndex)
|
|
89
|
-
*/
|
|
90
|
-
var CallbackType = {
|
|
91
|
-
onCheck: _propTypes["default"].func,
|
|
92
|
-
onRadio: _propTypes["default"].func,
|
|
93
|
-
onDoubleClick: _propTypes["default"].func,
|
|
94
|
-
onLink: _propTypes["default"].func,
|
|
95
|
-
onTableChange: _propTypes["default"].func,
|
|
96
|
-
onMoveRow: _propTypes["default"].func
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* checkbox: [可选],是否有复选框,默认为true
|
|
101
|
-
* isPaging: [可选],是否分页,默认为false
|
|
102
|
-
* radio: [可选],是否为单选按钮,当checkbox为true时生效,默认值为false
|
|
103
|
-
* isolation: [可选],为true时,复选框的选中行采用checkedRows存储
|
|
104
|
-
* checkedRows: [可选],选中的行数,radio为true时生效
|
|
105
|
-
* index: [可选],是否有序号,默认值为true
|
|
106
|
-
* indexTitle:[可选],序号标题,默认为'序号'
|
|
107
|
-
* sortInfo: [可选],排序信息,默认为null
|
|
108
|
-
* filterInfo: [可选],过滤信息,默认为null
|
|
109
|
-
* maxHeight: [可选],设置表格的最大高度
|
|
110
|
-
* dragSort: [可选], 为true表示支持行拖曳排序,且不支持行单击选中复选或单选按钮和双击事件,默认为false
|
|
111
|
-
* isEmphasized: [可选],是否强调,行字体加粗显示;要实现字体加粗显示除了isEmphasized设置为true之外,加粗行数据里要设置__isEmphasized为true
|
|
112
|
-
* isWeaken: [可选],是否弱化行字体置灰显示,除了isWeaken设置为true之外,置灰行数据里要设置__isWeaken为true
|
|
113
|
-
* pageTotal: [可选], 为true表示开启表格末行自动汇总表格列数据,默认为false || searchTotal,当开启时,需要汇总的列需设置属性total为true,当dragSort为true时,该选项失效
|
|
114
|
-
* searchTotal: [可选], 表格汇总数据对象,该属性不为空时pageTotal默认开启,当dragSort为true时,该选项失效
|
|
115
|
-
*/
|
|
116
|
-
var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
117
|
-
(0, _inherits2["default"])(SuperTable, _React$Component);
|
|
118
|
-
var _super = _createSuper(SuperTable);
|
|
119
|
-
function SuperTable() {
|
|
120
|
-
var _context;
|
|
121
|
-
var _this;
|
|
122
|
-
(0, _classCallCheck2["default"])(this, SuperTable);
|
|
123
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
124
|
-
args[_key] = arguments[_key];
|
|
125
|
-
}
|
|
126
|
-
_this = _super.call.apply(_super, (0, _concat["default"])(_context = [this]).call(_context, args));
|
|
127
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
|
|
128
|
-
filterVisibleKey: ''
|
|
129
|
-
});
|
|
130
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onTableChange", function (pagination, filters, sorter) {
|
|
131
|
-
var _ref = _this.props.callback || {},
|
|
132
|
-
onTableChange = _ref.onTableChange;
|
|
133
|
-
var _this$props$filterInf = _this.props.filterInfo,
|
|
134
|
-
filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
|
|
135
|
-
onTableChange && onTableChange(sorter, filterInfo);
|
|
136
|
-
});
|
|
137
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onChange", function () {
|
|
138
|
-
var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
139
|
-
var _ref2 = _this.props.callback || {},
|
|
140
|
-
onCheck = _ref2.onCheck;
|
|
141
|
-
if (onCheck) {
|
|
142
|
-
var _this$props = _this.props,
|
|
143
|
-
_this$props$items = _this$props.items,
|
|
144
|
-
items = _this$props$items === void 0 ? [] : _this$props$items,
|
|
145
|
-
_this$props$isWeaken = _this$props.isWeaken,
|
|
146
|
-
isWeaken = _this$props$isWeaken === void 0 ? false : _this$props$isWeaken,
|
|
147
|
-
pageTotal = _this$props.pageTotal,
|
|
148
|
-
searchTotal = _this$props.searchTotal;
|
|
149
|
-
var offset = 0;
|
|
150
|
-
pageTotal && offset--;
|
|
151
|
-
searchTotal && offset--;
|
|
152
|
-
var realSlectedList = selectedKeyArr.length > items.length ? (0, _slice["default"])(selectedKeyArr).call(selectedKeyArr, 0, selectedKeyArr.length + offset) : selectedKeyArr;
|
|
153
|
-
var selectedKeys = isWeaken ? (0, _filter["default"])(realSlectedList).call(realSlectedList, function (o) {
|
|
154
|
-
return !items[o].__isWeaken;
|
|
155
|
-
}) : realSlectedList;
|
|
156
|
-
var newItems = isWeaken ? (0, _filter["default"])(items).call(items, function (o) {
|
|
157
|
-
return !o.__isWeaken;
|
|
158
|
-
}) : items;
|
|
159
|
-
if (selectedKeys.length === 0) {
|
|
160
|
-
onCheck(true, false, -1);
|
|
161
|
-
} else if (selectedKeys.length === newItems.length) {
|
|
162
|
-
var checked = (0, _every["default"])(newItems).call(newItems, function (o) {
|
|
163
|
-
return o.checked;
|
|
164
|
-
});
|
|
165
|
-
onCheck(true, !checked, -1);
|
|
166
|
-
} else {
|
|
167
|
-
var defaultSelectedKeys = _this.getSelectedRowKeys(newItems);
|
|
168
|
-
if (selectedKeys.length > defaultSelectedKeys.length) {
|
|
169
|
-
if (_this.props.isPaging && selectedKeys.length - defaultSelectedKeys.length > 1) {
|
|
170
|
-
return onCheck(true, true, -1);
|
|
171
|
-
}
|
|
172
|
-
onCheck(false, true, selectedKeys[selectedKeys.length - 1]);
|
|
173
|
-
} else {
|
|
174
|
-
var index = (0, _findIndex["default"])(defaultSelectedKeys).call(defaultSelectedKeys, function (key) {
|
|
175
|
-
return !(0, _some["default"])(selectedKeys).call(selectedKeys, function (select) {
|
|
176
|
-
return select === key;
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
onCheck(false, false, defaultSelectedKeys[index]);
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onCheckChange", function (selectedKeys) {
|
|
185
|
-
var _ref3 = _this.props.callback || {},
|
|
186
|
-
onCheck = _ref3.onCheck;
|
|
187
|
-
onCheck && onCheck(selectedKeys);
|
|
188
|
-
});
|
|
189
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRadioChange", function (selectedKeys) {
|
|
190
|
-
var _ref4 = _this.props.callback || {},
|
|
191
|
-
onRadio = _ref4.onRadio;
|
|
192
|
-
onRadio && onRadio(selectedKeys);
|
|
193
|
-
});
|
|
194
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRadioRowClick", function (record) {
|
|
195
|
-
var _ref5 = _this.props.callback || {},
|
|
196
|
-
onRadio = _ref5.onRadio;
|
|
197
|
-
onRadio && onRadio([record.key]);
|
|
198
|
-
});
|
|
199
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onRowClick", function (record) {
|
|
200
|
-
var _this$props2 = _this.props,
|
|
201
|
-
_this$props2$isWeaken = _this$props2.isWeaken,
|
|
202
|
-
isWeaken = _this$props2$isWeaken === void 0 ? false : _this$props2$isWeaken,
|
|
203
|
-
items = _this$props2.items;
|
|
204
|
-
if (items.length <= record.key) return;
|
|
205
|
-
clearTimeout(_this.timer);
|
|
206
|
-
_this.timer = (0, _setTimeout2["default"])(function () {
|
|
207
|
-
var _ref6 = _this.props.callback || {},
|
|
208
|
-
onCheck = _ref6.onCheck;
|
|
209
|
-
if (onCheck) {
|
|
210
|
-
var _this$props3 = _this.props,
|
|
211
|
-
isolation = _this$props3.isolation,
|
|
212
|
-
_this$props3$checkedR = _this$props3.checkedRows,
|
|
213
|
-
checkedRows = _this$props3$checkedR === void 0 ? [] : _this$props3$checkedR;
|
|
214
|
-
if (isolation) {
|
|
215
|
-
if ((0, _includes["default"])(checkedRows).call(checkedRows, record.key)) {
|
|
216
|
-
onCheck((0, _filter["default"])(checkedRows).call(checkedRows, function (key) {
|
|
217
|
-
return record.key !== key;
|
|
218
|
-
}));
|
|
219
|
-
} else {
|
|
220
|
-
onCheck((0, _concat["default"])(checkedRows).call(checkedRows, record.key));
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
var checked = isWeaken && items[record.key].__isWeaken ? false : !record.checked;
|
|
224
|
-
onCheck(false, checked, record.key);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}, 250);
|
|
228
|
-
});
|
|
229
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onDoubleClick", function (record) {
|
|
230
|
-
clearTimeout(_this.timer);
|
|
231
|
-
var _ref7 = _this.props.callback || {},
|
|
232
|
-
onDoubleClick = _ref7.onDoubleClick;
|
|
233
|
-
onDoubleClick && onDoubleClick(record.key);
|
|
234
|
-
});
|
|
235
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLink", function (key, index, item, e) {
|
|
236
|
-
var _ref8 = _this.props.callback || {},
|
|
237
|
-
onLink = _ref8.onLink;
|
|
238
|
-
onLink && onLink(key, index, item);
|
|
239
|
-
e.stopPropagation();
|
|
240
|
-
});
|
|
241
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onLinkDouble", function (e) {
|
|
242
|
-
e.stopPropagation();
|
|
243
|
-
});
|
|
244
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "onMoveRow", function (dragIndex, targetIndex) {
|
|
245
|
-
var _ref9 = _this.props.callback || {},
|
|
246
|
-
onMoveRow = _ref9.onMoveRow;
|
|
247
|
-
onMoveRow && onMoveRow(dragIndex, targetIndex);
|
|
248
|
-
});
|
|
249
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSelectedRowKeys", function (items) {
|
|
250
|
-
return (0, _reduce["default"])(items).call(items, function (result, item, index) {
|
|
251
|
-
item.checked && result.push(index);
|
|
252
|
-
return result;
|
|
253
|
-
}, []);
|
|
254
|
-
});
|
|
255
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getIndexInfo", function () {
|
|
256
|
-
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
257
|
-
var _this$props4 = _this.props,
|
|
258
|
-
_this$props4$index = _this$props4.index,
|
|
259
|
-
index = _this$props4$index === void 0 ? true : _this$props4$index,
|
|
260
|
-
_this$props4$indexTit = _this$props4.indexTitle,
|
|
261
|
-
indexTitle = _this$props4$indexTit === void 0 ? '序号' : _this$props4$indexTit;
|
|
262
|
-
return index ? [{
|
|
263
|
-
key: 'index',
|
|
264
|
-
title: indexTitle,
|
|
265
|
-
render: function render(text, record, index) {
|
|
266
|
-
return items[record.key].__totalIndexTitle || index + 1;
|
|
267
|
-
}
|
|
268
|
-
}] : [];
|
|
269
|
-
});
|
|
270
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setSortInfo", function (col, sortInfo) {
|
|
271
|
-
if (col.sorter === 'string') {
|
|
272
|
-
col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
|
|
273
|
-
col.sorter = function (row1, row2) {
|
|
274
|
-
var a = !col.link ? row1[col.key] : row1[col.key].props.children;
|
|
275
|
-
var b = !col.link ? row2[col.key] : row2[col.key].props.children;
|
|
276
|
-
if (a > b) {
|
|
277
|
-
return 1;
|
|
278
|
-
} else if (a === b) {
|
|
279
|
-
return 0;
|
|
280
|
-
} else {
|
|
281
|
-
return -1;
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
} else if (col.sorter === 'number') {
|
|
285
|
-
col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
|
|
286
|
-
col.sorter = function (a, b) {
|
|
287
|
-
return a[col.key] - b[col.key];
|
|
288
|
-
};
|
|
289
|
-
} else {
|
|
290
|
-
delete col.sorter;
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setFilterInfo", function (col, filterInfo, visibleKey) {
|
|
294
|
-
if ((0, _filter["default"])(col)) {
|
|
295
|
-
var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
|
|
296
|
-
isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
|
|
297
|
-
var onSearch = function onSearch(value) {
|
|
298
|
-
var _ref10 = _this.props.callback || {},
|
|
299
|
-
onTableChange = _ref10.onTableChange;
|
|
300
|
-
var _this$props$sortInfo = _this.props.sortInfo,
|
|
301
|
-
sortInfo = _this$props$sortInfo === void 0 ? null : _this$props$sortInfo;
|
|
302
|
-
var newFilterInfo = (0, _assign["default"])({}, filterInfo, (0, _defineProperty2["default"])({}, col.key, value));
|
|
303
|
-
_this.setState({
|
|
304
|
-
filterVisibleKey: ''
|
|
305
|
-
});
|
|
306
|
-
onTableChange && onTableChange(sortInfo, newFilterInfo);
|
|
307
|
-
};
|
|
308
|
-
var value = filterInfo[col.key];
|
|
309
|
-
col.filteredValue = value ? [value] : null;
|
|
310
|
-
col.filterDropdownVisible = visibleKey === col.key;
|
|
311
|
-
var onClose = function onClose() {
|
|
312
|
-
_this.setState({
|
|
313
|
-
filterVisibleKey: ''
|
|
314
|
-
});
|
|
315
|
-
};
|
|
316
|
-
col.filterDropdown = /*#__PURE__*/_react["default"].createElement(_FilterDropDown["default"], {
|
|
317
|
-
value: value,
|
|
318
|
-
onSearch: onSearch,
|
|
319
|
-
onClose: onClose,
|
|
320
|
-
isDateFilterByStartAndEnd: isDateFilterByStartAndEnd
|
|
321
|
-
});
|
|
322
|
-
col.onFilterDropdownVisibleChange = function (visible) {
|
|
323
|
-
if (isDateFilterByStartAndEnd) {
|
|
324
|
-
visible && _this.setState({
|
|
325
|
-
filterVisibleKey: col.key
|
|
326
|
-
});
|
|
327
|
-
} else {
|
|
328
|
-
_this.setState({
|
|
329
|
-
filterVisibleKey: visible ? col.key : ''
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
col.onFilter = function (value, record) {
|
|
334
|
-
var items = _this.getItems();
|
|
335
|
-
if (items[record.key].__total) return true;
|
|
336
|
-
var content = !col.link ? record[col.key] : record[col.key].props.children;
|
|
337
|
-
if (!col.isDateFilterByStartAndEnd) {
|
|
338
|
-
var con = (0, _isArray["default"])(content) ? content : String(content);
|
|
339
|
-
return (0, _includes["default"])(con).call(con, value);
|
|
340
|
-
} else {
|
|
341
|
-
return !(value.start && new Date(value.start) > new Date(content) || value.end && value.end < content);
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
delete col.filter;
|
|
346
|
-
});
|
|
347
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "linkList", function (key, index, item) {
|
|
348
|
-
var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
|
|
349
|
-
var list = item[key] || [];
|
|
350
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, (0, _map["default"])(list).call(list, function (item2, index2) {
|
|
351
|
-
var _context2, _context3;
|
|
352
|
-
var split = index2 === list.length - 1 ? '' : ',';
|
|
353
|
-
var onClick = (0, _bind["default"])(_context2 = _this.onLink).call(_context2, null, key, index, item2);
|
|
354
|
-
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
355
|
-
key: index2,
|
|
356
|
-
onClick: onClick,
|
|
357
|
-
onDoubleClick: _this.onLinkDouble
|
|
358
|
-
}, (0, _concat["default"])(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
|
|
359
|
-
}));
|
|
360
|
-
});
|
|
361
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "waring", function (key, index, item, warningKey) {
|
|
362
|
-
var text = item[key] ? item[key] : '';
|
|
363
|
-
var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
|
|
364
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", {
|
|
365
|
-
style: {
|
|
366
|
-
color: color
|
|
367
|
-
}
|
|
368
|
-
}, text.title ? text.title : text));
|
|
369
|
-
});
|
|
370
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "defaultList", function (key, index, item, text, link) {
|
|
371
|
-
var _context4;
|
|
372
|
-
var onClick = (0, _bind["default"])(_context4 = _this.onLink).call(_context4, null, key, index, item);
|
|
373
|
-
if (link && typeof link === 'string') {
|
|
374
|
-
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
375
|
-
onClick: onClick,
|
|
376
|
-
onDoubleClick: _this.onLinkDouble
|
|
377
|
-
}, text);
|
|
378
|
-
}
|
|
379
|
-
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, text));
|
|
380
|
-
});
|
|
381
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumns", function (cols, items) {
|
|
382
|
-
var _context5, _context6;
|
|
383
|
-
var _this$props5 = _this.props,
|
|
384
|
-
sortInfo = _this$props5.sortInfo,
|
|
385
|
-
filterInfo = _this$props5.filterInfo;
|
|
386
|
-
var filterVisibleKey = _this.state.filterVisibleKey;
|
|
387
|
-
return (0, _map["default"])(_context5 = (0, _concat["default"])(_context6 = _this.getIndexInfo(items)).call(_context6, (0, _filter["default"])(cols).call(cols, function (col) {
|
|
388
|
-
return !col.hide;
|
|
389
|
-
}))).call(_context5, function (_ref11) {
|
|
390
|
-
var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref11), _ref11));
|
|
391
|
-
col.dataIndex = col.key;
|
|
392
|
-
col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? (0, _variables["default"])('SuperTable')[col.align] : '';
|
|
393
|
-
col.noWrap && (col.className = (0, _variables["default"])('SuperTable').noWrap);
|
|
394
|
-
_this.setSortInfo(col, sortInfo || {});
|
|
395
|
-
_this.setFilterInfo(col, filterInfo || {}, filterVisibleKey);
|
|
396
|
-
if (col.defaultValue) {
|
|
397
|
-
col.render = function (text, record, index) {
|
|
398
|
-
return _this.defaultList(col.key, index, items[index], col.defaultValue, col.link);
|
|
399
|
-
};
|
|
400
|
-
} else if (col.link === 'list') {
|
|
401
|
-
col.render = function (text, record, index) {
|
|
402
|
-
return _this.linkList(col.key, index, items[index], col.linkTitleKey);
|
|
403
|
-
};
|
|
404
|
-
} else if (col.link && typeof col.link === 'string') {
|
|
405
|
-
col.render = function (text, record, index) {
|
|
406
|
-
return _this.link(col.key, index, items[index], col.link);
|
|
407
|
-
};
|
|
408
|
-
} else if (col.isWarning) {
|
|
409
|
-
col.render = function (text, record, index) {
|
|
410
|
-
return _this.waring(col.key, index, items[index], col.warningKey);
|
|
411
|
-
};
|
|
412
|
-
} else if (col.tooltip) {
|
|
413
|
-
col.render = function (text, record, index) {
|
|
414
|
-
return _this.tooltip(col.key, index, items[index], col);
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
return col;
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getText", function (value, options) {
|
|
421
|
-
if ((0, _isArray["default"])(value)) {
|
|
422
|
-
return (0, _map["default"])(value).call(value, function (v) {
|
|
423
|
-
return (0, _Control.getTitle)(v, options);
|
|
424
|
-
}).toString();
|
|
425
|
-
} else {
|
|
426
|
-
return (0, _Control.getTitle)(value, options);
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "link", function (key, index, item, text) {
|
|
430
|
-
var _context7;
|
|
431
|
-
var onClick = (0, _bind["default"])(_context7 = _this.onLink).call(_context7, null, key, index, item);
|
|
432
|
-
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
433
|
-
onClick: onClick,
|
|
434
|
-
onDoubleClick: _this.onLinkDouble
|
|
435
|
-
}, text);
|
|
436
|
-
});
|
|
437
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "tooltip", function (key, index, item, _ref12) {
|
|
438
|
-
var tipLen = _ref12.tooltip,
|
|
439
|
-
options = _ref12.options;
|
|
440
|
-
var text = _this.getText(item[key], options);
|
|
441
|
-
var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
|
|
442
|
-
return needTip ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
443
|
-
title: text
|
|
444
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, (0, _slice["default"])(text).call(text, 0, tipLen) + '...')) : /*#__PURE__*/_react["default"].createElement("span", null, (0, _isArray["default"])(text) ? text.join(',') : text);
|
|
445
|
-
});
|
|
446
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getImgSrc", function (value, options) {
|
|
447
|
-
var index = (0, _findIndex["default"])(options).call(options, function (obj) {
|
|
448
|
-
return obj.value == value;
|
|
449
|
-
});
|
|
450
|
-
return index === -1 ? null : options[index].img;
|
|
451
|
-
});
|
|
452
|
-
/**
|
|
453
|
-
*
|
|
454
|
-
* @param item{array}:列数据
|
|
455
|
-
* @param key{string}:字段key
|
|
456
|
-
* @param options{array}:字段options
|
|
457
|
-
* @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
|
|
458
|
-
*/
|
|
459
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getSourceText", function (item, key, options, dataSource) {
|
|
460
|
-
var value = {};
|
|
461
|
-
if (typeof dataSource === 'string') {
|
|
462
|
-
value = item[dataSource] || {};
|
|
463
|
-
} else if ((0, _isArray["default"])(dataSource)) {
|
|
464
|
-
(0, _forEach["default"])(dataSource).call(dataSource, function (source, index) {
|
|
465
|
-
/*如果字段重复则用dataSource取到结果,key不作为取字段的标准*/
|
|
466
|
-
if (index === 0) {
|
|
467
|
-
value = item[source] || {};
|
|
468
|
-
} else {
|
|
469
|
-
value = value[source] || {};
|
|
470
|
-
}
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
/*如果上面已经取到结果则不进入*/
|
|
474
|
-
if (typeof value !== 'string') {
|
|
475
|
-
value = value[key];
|
|
476
|
-
}
|
|
477
|
-
return _this.getText(value, options);
|
|
478
|
-
});
|
|
479
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getDataSource", function (items, cols) {
|
|
480
|
-
return (0, _map["default"])(items).call(items, function (item, index) {
|
|
481
|
-
return (0, _reduce["default"])(cols).call(cols, function (result, _ref13) {
|
|
482
|
-
var key = _ref13.key,
|
|
483
|
-
options = _ref13.options,
|
|
484
|
-
link = _ref13.link,
|
|
485
|
-
icon = _ref13.icon,
|
|
486
|
-
dataSource = _ref13.dataSource;
|
|
487
|
-
if (link) {
|
|
488
|
-
if (typeof link === 'boolean') {
|
|
489
|
-
result[key] = _this.link(key, index, item, _this.getText(item[key], options));
|
|
490
|
-
}
|
|
491
|
-
} else if (icon) {
|
|
492
|
-
var _context8;
|
|
493
|
-
//单独的icon列,icon=true数据值根据options获得显示的图片url
|
|
494
|
-
var src = _this.getImgSrc(item[key], options);
|
|
495
|
-
var onClick = (0, _bind["default"])(_context8 = _this.onLink).call(_context8, null, key, index, item);
|
|
496
|
-
result[key] = src ? /*#__PURE__*/_react["default"].createElement("img", {
|
|
497
|
-
src: src,
|
|
498
|
-
onClick: onClick
|
|
499
|
-
}) : '';
|
|
500
|
-
} else if (dataSource) {
|
|
501
|
-
result[key] = _this.getSourceText(item, key, options, dataSource);
|
|
502
|
-
} else {
|
|
503
|
-
result[key] = _this.getText(item[key], options);
|
|
504
|
-
}
|
|
505
|
-
return result;
|
|
506
|
-
}, {
|
|
507
|
-
key: index,
|
|
508
|
-
checked: !!item.checked
|
|
509
|
-
});
|
|
510
|
-
});
|
|
511
|
-
});
|
|
512
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getPropsByCheckbox", function (items) {
|
|
513
|
-
var _this$props6 = _this.props,
|
|
514
|
-
_this$props6$checkbox = _this$props6.checkbox,
|
|
515
|
-
checkbox = _this$props6$checkbox === void 0 ? true : _this$props6$checkbox,
|
|
516
|
-
_this$props6$radio = _this$props6.radio,
|
|
517
|
-
radio = _this$props6$radio === void 0 ? false : _this$props6$radio,
|
|
518
|
-
isolation = _this$props6.isolation,
|
|
519
|
-
_this$props6$checkedR = _this$props6.checkedRows,
|
|
520
|
-
checkedRows = _this$props6$checkedR === void 0 ? [] : _this$props6$checkedR,
|
|
521
|
-
_this$props6$isEmphas = _this$props6.isEmphasized,
|
|
522
|
-
isEmphasized = _this$props6$isEmphas === void 0 ? false : _this$props6$isEmphas,
|
|
523
|
-
_this$props6$isWeaken = _this$props6.isWeaken,
|
|
524
|
-
isWeaken = _this$props6$isWeaken === void 0 ? true : _this$props6$isWeaken;
|
|
525
|
-
var rowClassName1 = function rowClassName1(record) {
|
|
526
|
-
if (items[record.key].__total) return (0, _variables["default"])('SuperTable').totalRow;
|
|
527
|
-
if (items[record.key].__warningRow) return (0, _variables["default"])('SuperTable').warningRow;
|
|
528
|
-
return (0, _includes["default"])(checkedRows).call(checkedRows, record.key) ? (0, _variables["default"])('SuperTable').select : '';
|
|
529
|
-
};
|
|
530
|
-
var rowClassName2 = function rowClassName2(record) {
|
|
531
|
-
if (items[record.key].__total) return (0, _variables["default"])('SuperTable').totalRow;
|
|
532
|
-
if (items[record.key].__warningRow) return (0, _variables["default"])('SuperTable').warningRow;
|
|
533
|
-
if (isEmphasized && items[record.key].__isEmphasized) {
|
|
534
|
-
return items[record.key].checked ? (0, _variables["default"])('SuperTable').emphasizedSelectRow : (0, _variables["default"])('SuperTable').emphasizedUnselectRow;
|
|
535
|
-
}
|
|
536
|
-
if (isWeaken && items[record.key].__isWeaken) {
|
|
537
|
-
return items[record.key].checked ? (0, _variables["default"])('SuperTable').weakenedSelectRow : (0, _variables["default"])('SuperTable').weakenedUnselectRow;
|
|
538
|
-
}
|
|
539
|
-
return items[record.key].checked ? (0, _variables["default"])('SuperTable').select : '';
|
|
540
|
-
};
|
|
541
|
-
if (checkbox) {
|
|
542
|
-
if (radio) {
|
|
543
|
-
return {
|
|
544
|
-
rowClassName: rowClassName1,
|
|
545
|
-
onRowClick: _this.onRadioRowClick,
|
|
546
|
-
rowSelection: {
|
|
547
|
-
type: 'radio',
|
|
548
|
-
selectedRowKeys: checkedRows,
|
|
549
|
-
onChange: _this.onRadioChange
|
|
550
|
-
}
|
|
551
|
-
};
|
|
552
|
-
} else if (isolation) {
|
|
553
|
-
return {
|
|
554
|
-
rowClassName: rowClassName1,
|
|
555
|
-
onRowClick: _this.onRowClick,
|
|
556
|
-
rowSelection: {
|
|
557
|
-
selectedRowKeys: checkedRows,
|
|
558
|
-
onChange: _this.onCheckChange,
|
|
559
|
-
getCheckboxProps: function getCheckboxProps(record) {
|
|
560
|
-
var checked = (0, _includes["default"])(checkedRows).call(checkedRows, record.key);
|
|
561
|
-
return {
|
|
562
|
-
checked: checked,
|
|
563
|
-
disabled: items[record.key].__isWeaken,
|
|
564
|
-
style: items[record.key].__total ? {
|
|
565
|
-
display: 'none'
|
|
566
|
-
} : {}
|
|
567
|
-
};
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
} else {
|
|
572
|
-
return {
|
|
573
|
-
rowClassName: rowClassName2,
|
|
574
|
-
onRowClick: _this.onRowClick,
|
|
575
|
-
rowSelection: {
|
|
576
|
-
selectedRowKeys: _this.getSelectedRowKeys(items),
|
|
577
|
-
onChange: _this.onChange,
|
|
578
|
-
getCheckboxProps: function getCheckboxProps(record) {
|
|
579
|
-
var checked = isWeaken && items[record.key].__isWeaken ? false : !!record.checked;
|
|
580
|
-
return {
|
|
581
|
-
checked: checked,
|
|
582
|
-
disabled: items[record.key].__isWeaken,
|
|
583
|
-
style: items[record.key].__total ? {
|
|
584
|
-
display: 'none'
|
|
585
|
-
} : {}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
}
|
|
591
|
-
} else {
|
|
592
|
-
return {
|
|
593
|
-
rowClassName: rowClassName2
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
});
|
|
597
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowProps", function (onRowClick) {
|
|
598
|
-
return function (record) {
|
|
599
|
-
return {
|
|
600
|
-
onClick: function onClick() {
|
|
601
|
-
return onRowClick && onRowClick(record);
|
|
602
|
-
},
|
|
603
|
-
onDoubleClick: function onDoubleClick() {
|
|
604
|
-
return _this.onDoubleClick(record);
|
|
605
|
-
}
|
|
606
|
-
};
|
|
607
|
-
};
|
|
608
|
-
});
|
|
609
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getRowPropsForDrag", function () {
|
|
610
|
-
return function (record, index) {
|
|
611
|
-
return {
|
|
612
|
-
index: index,
|
|
613
|
-
onMoveRow: _this.onMoveRow
|
|
614
|
-
};
|
|
615
|
-
};
|
|
616
|
-
});
|
|
617
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getItems", function () {
|
|
618
|
-
var _this$props7 = _this.props,
|
|
619
|
-
items = _this$props7.items,
|
|
620
|
-
cols = _this$props7.cols,
|
|
621
|
-
_this$props7$dragSort = _this$props7.dragSort,
|
|
622
|
-
dragSort = _this$props7$dragSort === void 0 ? false : _this$props7$dragSort,
|
|
623
|
-
_this$props7$pageTota = _this$props7.pageTotal,
|
|
624
|
-
pageTotal = _this$props7$pageTota === void 0 ? false : _this$props7$pageTota,
|
|
625
|
-
searchTotal = _this$props7.searchTotal;
|
|
626
|
-
var resItems = items;
|
|
627
|
-
if (!dragSort && items.length > 1) {
|
|
628
|
-
if (pageTotal || searchTotal) {
|
|
629
|
-
var totalItem = (0, _reduce["default"])(cols).call(cols, function (result, _ref14) {
|
|
630
|
-
var key = _ref14.key,
|
|
631
|
-
_ref14$total = _ref14.total,
|
|
632
|
-
total = _ref14$total === void 0 ? false : _ref14$total;
|
|
633
|
-
if (total) {
|
|
634
|
-
result[key] = (0, _parseFloat2["default"])(Number((0, _reduce["default"])(items).call(items, function (result, item) {
|
|
635
|
-
return (0, _parseFloat2["default"])(String(item[key] || 0)) + result;
|
|
636
|
-
}, 0)).toFixed(4));
|
|
637
|
-
}
|
|
638
|
-
return result;
|
|
639
|
-
}, {
|
|
640
|
-
__total: true,
|
|
641
|
-
__totalIndexTitle: '本页汇总'
|
|
642
|
-
});
|
|
643
|
-
resItems = (0, _concat["default"])(resItems).call(resItems, [totalItem]);
|
|
644
|
-
}
|
|
645
|
-
if (searchTotal) {
|
|
646
|
-
resItems = (0, _concat["default"])(resItems).call(resItems, [_objectSpread(_objectSpread({}, searchTotal), {}, {
|
|
647
|
-
__total: true,
|
|
648
|
-
__totalIndexTitle: '查询汇总'
|
|
649
|
-
})]);
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
return resItems;
|
|
653
|
-
});
|
|
654
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "toTotalFooter", function () {
|
|
655
|
-
var _this$props8 = _this.props,
|
|
656
|
-
cols = _this$props8.cols,
|
|
657
|
-
items = _this$props8.items,
|
|
658
|
-
isolation = _this$props8.isolation,
|
|
659
|
-
checkedRows = _this$props8.checkedRows;
|
|
660
|
-
var totalCols = (0, _filter["default"])(cols).call(cols, function (item) {
|
|
661
|
-
return item.total;
|
|
662
|
-
});
|
|
663
|
-
if (totalCols.length > 0) {
|
|
664
|
-
var checkedItems = isolation ? (0, _filter["default"])(items).call(items, function (item, index) {
|
|
665
|
-
return (0, _includes["default"])(checkedRows).call(checkedRows, index);
|
|
666
|
-
}) : (0, _filter["default"])(items).call(items, function (item) {
|
|
667
|
-
return item.checked;
|
|
668
|
-
});
|
|
669
|
-
var countItems = checkedItems.length ? checkedItems : items;
|
|
670
|
-
var totalItems = (0, _map["default"])(totalCols).call(totalCols, function (_ref15) {
|
|
671
|
-
var title = _ref15.title,
|
|
672
|
-
key = _ref15.key,
|
|
673
|
-
_ref15$props = _ref15.props,
|
|
674
|
-
props = _ref15$props === void 0 ? {} : _ref15$props;
|
|
675
|
-
var value = (0, _reduce["default"])(countItems).call(countItems, function (result, item) {
|
|
676
|
-
return (0, _parseFloat2["default"])((result + Number(item[key] || 0)).toFixed(props.precision || 6));
|
|
677
|
-
}, 0);
|
|
678
|
-
return {
|
|
679
|
-
title: title,
|
|
680
|
-
value: value
|
|
681
|
-
};
|
|
682
|
-
});
|
|
683
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
684
|
-
style: {
|
|
685
|
-
height: '36px',
|
|
686
|
-
lineHeight: '36px'
|
|
687
|
-
}
|
|
688
|
-
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
689
|
-
style: {
|
|
690
|
-
marginRight: "15px"
|
|
691
|
-
}
|
|
692
|
-
}, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), (0, _map["default"])(totalItems).call(totalItems, function (_ref16, index) {
|
|
693
|
-
var title = _ref16.title,
|
|
694
|
-
value = _ref16.value;
|
|
695
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
696
|
-
key: index,
|
|
697
|
-
style: {
|
|
698
|
-
marginRight: "10px"
|
|
699
|
-
}
|
|
700
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, title, ": "), /*#__PURE__*/_react["default"].createElement("span", {
|
|
701
|
-
style: {
|
|
702
|
-
color: '#01a4ff'
|
|
703
|
-
}
|
|
704
|
-
}, value));
|
|
705
|
-
}));
|
|
706
|
-
} else {
|
|
707
|
-
return null;
|
|
708
|
-
}
|
|
709
|
-
});
|
|
710
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getProps", function () {
|
|
711
|
-
var _this$props9 = _this.props,
|
|
712
|
-
cols = _this$props9.cols,
|
|
713
|
-
_this$props9$isPaging = _this$props9.isPaging,
|
|
714
|
-
isPaging = _this$props9$isPaging === void 0 ? false : _this$props9$isPaging,
|
|
715
|
-
_this$props9$isEmphas = _this$props9.isEmphasized,
|
|
716
|
-
isEmphasized = _this$props9$isEmphas === void 0 ? false : _this$props9$isEmphas,
|
|
717
|
-
_this$props9$isWeaken = _this$props9.isWeaken,
|
|
718
|
-
isWeaken = _this$props9$isWeaken === void 0 ? false : _this$props9$isWeaken,
|
|
719
|
-
dragSort = _this$props9.dragSort,
|
|
720
|
-
_this$props9$footer = _this$props9.footer,
|
|
721
|
-
footer = _this$props9$footer === void 0 ? null : _this$props9$footer;
|
|
722
|
-
var items = _this.getItems();
|
|
723
|
-
var _this$getPropsByCheck = _this.getPropsByCheckbox(items),
|
|
724
|
-
onRowClick = _this$getPropsByCheck.onRowClick,
|
|
725
|
-
extraProps = (0, _objectWithoutProperties2["default"])(_this$getPropsByCheck, _excluded);
|
|
726
|
-
var renderProps = _objectSpread({
|
|
727
|
-
className: !isEmphasized || !isWeaken ? (0, _variables["default"])('SuperTable') : (0, _variables["default"])('SuperTable').noTransition,
|
|
728
|
-
columns: _this.getColumns(cols, items),
|
|
729
|
-
dataSource: _this.getDataSource(items, cols),
|
|
730
|
-
size: 'small',
|
|
731
|
-
pagination: isPaging,
|
|
732
|
-
scroll: {
|
|
733
|
-
x: true
|
|
734
|
-
},
|
|
735
|
-
onChange: _this.onTableChange,
|
|
736
|
-
onRow: dragSort ? _this.getRowPropsForDrag() : _this.getRowProps(onRowClick),
|
|
737
|
-
components: dragSort ? {
|
|
738
|
-
body: {
|
|
739
|
-
row: _DragSortRow["default"]
|
|
740
|
-
}
|
|
741
|
-
} : {},
|
|
742
|
-
footer: footer ? footer : _this.toTotalFooter
|
|
743
|
-
}, extraProps);
|
|
744
|
-
return renderProps;
|
|
745
|
-
});
|
|
746
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "setScroll", function () {
|
|
747
|
-
var _this$props10 = _this.props,
|
|
748
|
-
maxHeight = _this$props10.maxHeight,
|
|
749
|
-
pageTotal = _this$props10.pageTotal,
|
|
750
|
-
searchTotal = _this$props10.searchTotal;
|
|
751
|
-
if (maxHeight && _this.getItems().length) {
|
|
752
|
-
var root = _reactDom["default"].findDOMNode((0, _assertThisInitialized2["default"])(_this));
|
|
753
|
-
var container = root.getElementsByClassName('ant-table-body')[0];
|
|
754
|
-
var header = root.getElementsByClassName('ant-table-thead')[0];
|
|
755
|
-
var tbody = root.getElementsByClassName('ant-table-tbody')[0];
|
|
756
|
-
var pageTotalOffset = searchTotal ? 2 : 1;
|
|
757
|
-
var pageTotalElement = pageTotal && tbody && tbody.children ? tbody.children[tbody.children.length - pageTotalOffset] : null;
|
|
758
|
-
var searchTotalElement = searchTotal && tbody && tbody.children ? tbody.children[tbody.children.length - 1] : null;
|
|
759
|
-
(0, _fixed["default"])(container, header, maxHeight, {
|
|
760
|
-
pageTotalElement: pageTotalElement,
|
|
761
|
-
searchTotalElement: searchTotalElement
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
return _this;
|
|
766
|
-
}
|
|
767
|
-
(0, _createClass2["default"])(SuperTable, [{
|
|
768
|
-
key: "shouldComponentUpdate",
|
|
769
|
-
value: function shouldComponentUpdate(props, state) {
|
|
770
|
-
var _this2 = this;
|
|
771
|
-
var keys = ['cols', 'items', 'maxHeight', 'checkedRows', 'sortInfo', 'filterInfo'];
|
|
772
|
-
return (0, _some["default"])(keys).call(keys, function (key) {
|
|
773
|
-
return props[key] !== _this2.props[key];
|
|
774
|
-
}) || state.filterVisibleKey !== this.state.filterVisibleKey;
|
|
775
|
-
}
|
|
776
|
-
}, {
|
|
777
|
-
key: "componentDidMount",
|
|
778
|
-
value: function componentDidMount() {
|
|
779
|
-
this.setScroll();
|
|
780
|
-
}
|
|
781
|
-
}, {
|
|
782
|
-
key: "componentDidUpdate",
|
|
783
|
-
value: function componentDidUpdate() {
|
|
784
|
-
this.setScroll();
|
|
785
|
-
}
|
|
786
|
-
}, {
|
|
787
|
-
key: "render",
|
|
788
|
-
value: function render() {
|
|
789
|
-
return /*#__PURE__*/_react["default"].createElement(_table["default"], (0, _extends2["default"])({}, this.getProps(), {
|
|
790
|
-
key: this.props.items.length
|
|
791
|
-
}));
|
|
792
|
-
}
|
|
793
|
-
}]);
|
|
794
|
-
return SuperTable;
|
|
795
|
-
}(_react["default"].Component);
|
|
796
|
-
(0, _defineProperty2["default"])(SuperTable, "propTypes", {
|
|
797
|
-
cols: _propTypes["default"].arrayOf(_propTypes["default"].shape(ColType)).isRequired,
|
|
798
|
-
items: _propTypes["default"].arrayOf(_propTypes["default"].shape(ItemType)).isRequired,
|
|
799
|
-
isPaging: _propTypes["default"].bool,
|
|
800
|
-
checkbox: _propTypes["default"].bool,
|
|
801
|
-
radio: _propTypes["default"].bool,
|
|
802
|
-
isolation: _propTypes["default"].bool,
|
|
803
|
-
checkedRows: _propTypes["default"].array,
|
|
804
|
-
index: _propTypes["default"].bool,
|
|
805
|
-
indexTitle: _propTypes["default"].string,
|
|
806
|
-
sortInfo: _propTypes["default"].object,
|
|
807
|
-
filterInfo: _propTypes["default"].object,
|
|
808
|
-
maxHeight: _propTypes["default"].string,
|
|
809
|
-
callback: _propTypes["default"].shape(CallbackType),
|
|
810
|
-
isEmphasized: _propTypes["default"].bool,
|
|
811
|
-
isWeaken: _propTypes["default"].bool,
|
|
812
|
-
dragSort: _propTypes["default"].bool,
|
|
813
|
-
pageTotal: _propTypes["default"].bool,
|
|
814
|
-
searchTotal: _propTypes["default"].object
|
|
815
|
-
});
|
|
816
|
-
var _default = SuperTable;
|
|
817
|
-
exports["default"] = _default;
|