cloud-b2b 1.1.79 → 1.1.80
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/es/Area/Area.js +10 -13
- package/es/CodeInput/CodeInput.js +16 -19
- package/es/Enhance/Dialogs.js +11 -14
- package/es/Enhance/Loading.js +15 -18
- package/es/Header/Header.js +17 -20
- package/es/Header/Vertical.js +11 -14
- package/es/ImageView/ImageView.js +10 -13
- package/es/InpurCascader/InputCascader.js +11 -14
- package/es/InputEditor/InputEditor.js +16 -18
- package/es/InputSearch/InputSearch.js +20 -23
- package/es/InputSelect/InputSelect.js +14 -17
- package/es/InputTreeSelect/InputTreeSelect.js +10 -13
- package/es/InputWriting/InputWriting.js +12 -15
- package/es/Layout/Layout.js +14 -17
- package/es/Link/Link.js +7 -10
- package/es/NumberInput/NumberInput.js +13 -16
- package/es/Search/Search.js +52 -55
- package/es/Search2/Search.js +83 -86
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +11 -14
- package/es/Sidebar2/Sidebar.js +13 -16
- package/es/SuperForm/SuperForm.js +74 -79
- package/es/SuperForm2/SuperForm.js +107 -112
- package/es/SuperPagination/SuperPagination.js +8 -11
- package/es/SuperTab/SuperTab.js +12 -15
- package/es/SuperTab2/SuperTab2.js +13 -16
- package/es/SuperTable/DragSortRow.js +12 -15
- package/es/SuperTable/FilterDropDown.js +11 -14
- package/es/SuperTable/SuperTable.js +70 -73
- package/es/SuperTable2/SuperTable2.js +89 -92
- package/es/SuperTable2/SuperTable2.less +3 -1
- package/es/SuperTable2/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +12 -15
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +16 -19
- package/es/Viewer/Viewer.js +11 -14
- package/es/helper.js +18 -17
- package/lib/Area/Area.js +10 -13
- package/lib/CodeInput/CodeInput.js +16 -19
- package/lib/Enhance/Dialogs.js +11 -14
- package/lib/Enhance/Loading.js +15 -18
- package/lib/Header/Header.js +17 -20
- package/lib/Header/Vertical.js +11 -14
- package/lib/ImageView/ImageView.js +10 -13
- package/lib/InpurCascader/InputCascader.js +11 -14
- package/lib/InputEditor/InputEditor.js +16 -18
- package/lib/InputSearch/InputSearch.js +20 -23
- package/lib/InputSelect/InputSelect.js +14 -17
- package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
- package/lib/InputWriting/InputWriting.js +12 -15
- package/lib/Layout/Layout.js +14 -17
- package/lib/LayoutLink/LayoutLink.js +1 -2
- package/lib/Link/Link.js +7 -10
- package/lib/NumberInput/NumberInput.js +13 -16
- package/lib/Search/Search.js +53 -57
- package/lib/Search2/Search.js +84 -88
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +11 -14
- package/lib/Sidebar2/Sidebar.js +13 -16
- package/lib/SuperForm/SuperForm.js +75 -81
- package/lib/SuperForm2/SuperForm.js +108 -114
- package/lib/SuperPagination/SuperPagination.js +8 -11
- package/lib/SuperTab/SuperTab.js +12 -15
- package/lib/SuperTab2/SuperTab2.js +13 -16
- package/lib/SuperTable/DragSortRow.js +12 -15
- package/lib/SuperTable/FilterDropDown.js +11 -14
- package/lib/SuperTable/SuperTable.js +70 -73
- package/lib/SuperTable2/SuperTable2.js +90 -94
- package/lib/SuperTable2/SuperTable2.less +3 -1
- package/lib/SuperTable2/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +12 -15
- package/lib/SuperUpload/SuperUpload.js +39 -40
- package/lib/Viewer/ImageViews.js +16 -19
- package/lib/Viewer/Viewer.js +11 -14
- package/lib/helper.js +18 -17
- package/package.json +1 -1
|
@@ -18,10 +18,9 @@ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-sta
|
|
|
18
18
|
var _bind = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/bind"));
|
|
19
19
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
20
20
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
21
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
23
21
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
24
22
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
23
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
25
24
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
26
25
|
var _react = _interopRequireDefault(require("react"));
|
|
27
26
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -30,8 +29,8 @@ var _Control = _interopRequireDefault(require("../Control"));
|
|
|
30
29
|
var _helper = _interopRequireDefault(require("../helper"));
|
|
31
30
|
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; }
|
|
32
31
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(t), !0)).call(_context4, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
33
|
-
function
|
|
34
|
-
function _isNativeReflectConstruct() {
|
|
32
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
33
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
35
34
|
// 单元格的type只能取如下值:
|
|
36
35
|
// 'text', 'number', select', 'date', 'search', 'readonly', 'textArea', 'selectSearch'
|
|
37
36
|
|
|
@@ -46,8 +45,6 @@ var isInRegion = exports.isInRegion = function isInRegion(target, _ref) {
|
|
|
46
45
|
return !(x < left || x > right || y < top || y > bottom);
|
|
47
46
|
};
|
|
48
47
|
var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
49
|
-
(0, _inherits2["default"])(SuperTableCell, _React$Component);
|
|
50
|
-
var _super = _createSuper(SuperTableCell);
|
|
51
48
|
function SuperTableCell() {
|
|
52
49
|
var _context;
|
|
53
50
|
var _this;
|
|
@@ -55,19 +52,19 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
55
52
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
56
53
|
args[_key] = arguments[_key];
|
|
57
54
|
}
|
|
58
|
-
_this =
|
|
59
|
-
(0, _defineProperty2["default"])(
|
|
55
|
+
_this = _callSuper(this, SuperTableCell, (0, _concat["default"])(_context = []).call(_context, args));
|
|
56
|
+
(0, _defineProperty2["default"])(_this, "onDateBlur", function (value, event) {
|
|
60
57
|
if (!isInRegion(event.target, global.mousePos)) {
|
|
61
58
|
_this.props.onBlur();
|
|
62
59
|
}
|
|
63
60
|
});
|
|
64
|
-
(0, _defineProperty2["default"])(
|
|
61
|
+
(0, _defineProperty2["default"])(_this, "onChange", function (key, value) {
|
|
65
62
|
var onChange = _this.props.onChange;
|
|
66
63
|
if (onChange) {
|
|
67
64
|
onChange(key, value);
|
|
68
65
|
}
|
|
69
66
|
});
|
|
70
|
-
(0, _defineProperty2["default"])(
|
|
67
|
+
(0, _defineProperty2["default"])(_this, "onOpenChange", function (open) {
|
|
71
68
|
if (!open) {
|
|
72
69
|
var targets = document.getElementsByClassName('ant-calendar-picker-container');
|
|
73
70
|
if (!isInRegion(targets[0], global.mousePos)) {
|
|
@@ -75,71 +72,71 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
75
72
|
}
|
|
76
73
|
}
|
|
77
74
|
});
|
|
78
|
-
(0, _defineProperty2["default"])(
|
|
75
|
+
(0, _defineProperty2["default"])(_this, "options", function () {
|
|
79
76
|
return _this.props.options || _this.props.typeRelated || [];
|
|
80
77
|
});
|
|
81
|
-
(0, _defineProperty2["default"])(
|
|
82
|
-
return _reactDom["default"].findDOMNode(
|
|
78
|
+
(0, _defineProperty2["default"])(_this, "getPopupContainer", function () {
|
|
79
|
+
return _reactDom["default"].findDOMNode(_this);
|
|
83
80
|
});
|
|
84
|
-
(0, _defineProperty2["default"])(
|
|
81
|
+
(0, _defineProperty2["default"])(_this, "toTextComponent", function (props) {
|
|
85
82
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
86
83
|
});
|
|
87
|
-
(0, _defineProperty2["default"])(
|
|
84
|
+
(0, _defineProperty2["default"])(_this, "toTextAreaComponent", function (props) {
|
|
88
85
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
89
86
|
});
|
|
90
|
-
(0, _defineProperty2["default"])(
|
|
87
|
+
(0, _defineProperty2["default"])(_this, "toReadonlyComponent", function (props) {
|
|
91
88
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
92
89
|
});
|
|
93
|
-
(0, _defineProperty2["default"])(
|
|
90
|
+
(0, _defineProperty2["default"])(_this, "toNumberComponent", function (props) {
|
|
94
91
|
props.defaultValue = props.value;
|
|
95
92
|
delete props.value;
|
|
96
93
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
97
94
|
});
|
|
98
|
-
(0, _defineProperty2["default"])(
|
|
95
|
+
(0, _defineProperty2["default"])(_this, "toDoubleNumberComponent", function (props, cc) {
|
|
99
96
|
var _context2, _context3;
|
|
100
97
|
props.defaultValue = props.value;
|
|
101
98
|
props.doubleKey = props.key;
|
|
102
99
|
props.doubleValue = _helper["default"].getObject(cc, props.key);
|
|
103
|
-
props.onChangeKey1 = (0, _bind["default"])(_context2 = _this.onChange).call(_context2,
|
|
104
|
-
props.onChangeKey2 = (0, _bind["default"])(_context3 = _this.onChange).call(_context3,
|
|
100
|
+
props.onChangeKey1 = (0, _bind["default"])(_context2 = _this.onChange).call(_context2, _this, props.key[0]);
|
|
101
|
+
props.onChangeKey2 = (0, _bind["default"])(_context3 = _this.onChange).call(_context3, _this, props.key[1]);
|
|
105
102
|
delete props.value;
|
|
106
103
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
107
104
|
});
|
|
108
|
-
(0, _defineProperty2["default"])(
|
|
105
|
+
(0, _defineProperty2["default"])(_this, "toDateComponent", function (props) {
|
|
109
106
|
//props.getCalendarContainer = this.getPopupContainer;
|
|
110
107
|
props.onBlur = _this.onDateBlur;
|
|
111
108
|
props.onOpenChange = _this.onOpenChange;
|
|
112
109
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
113
110
|
});
|
|
114
|
-
(0, _defineProperty2["default"])(
|
|
111
|
+
(0, _defineProperty2["default"])(_this, "toSelectComponent", function (props) {
|
|
115
112
|
props.options = _this.options();
|
|
116
113
|
props.dropdownMatchSelectWidth = false;
|
|
117
114
|
//props.getPopupContainer = this.getPopupContainer;
|
|
118
115
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
119
116
|
});
|
|
120
|
-
(0, _defineProperty2["default"])(
|
|
117
|
+
(0, _defineProperty2["default"])(_this, "toSearchComponent", function (props) {
|
|
121
118
|
props.options = _this.options();
|
|
122
119
|
//props.getPopupContainer = this.getPopupContainer;
|
|
123
120
|
props.onSearch = _this.props.onSearch;
|
|
124
121
|
props.dropdownMatchSelectWidth = false;
|
|
125
122
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
126
123
|
});
|
|
127
|
-
(0, _defineProperty2["default"])(
|
|
124
|
+
(0, _defineProperty2["default"])(_this, "toCascader", function (props) {
|
|
128
125
|
props.options = _this.options() || [];
|
|
129
126
|
props.onSearch = _this.props.onSearch;
|
|
130
127
|
props.loadData = _this.props.onSearch;
|
|
131
128
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
132
129
|
});
|
|
133
|
-
(0, _defineProperty2["default"])(
|
|
130
|
+
(0, _defineProperty2["default"])(_this, "toSelectWriting", function (props) {
|
|
134
131
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
135
132
|
});
|
|
136
|
-
(0, _defineProperty2["default"])(
|
|
133
|
+
(0, _defineProperty2["default"])(_this, "toRadioGroup", function (props) {
|
|
137
134
|
console.log(props);
|
|
138
135
|
props.options = _this.options();
|
|
139
136
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
140
137
|
});
|
|
141
138
|
// 确保value的值为字符串(包含value和title的对象除外)
|
|
142
|
-
(0, _defineProperty2["default"])(
|
|
139
|
+
(0, _defineProperty2["default"])(_this, "makeString", function (value) {
|
|
143
140
|
if (value === null || typeof value === 'undefined') {
|
|
144
141
|
return '';
|
|
145
142
|
} else if (typeof value === 'number') {
|
|
@@ -148,7 +145,7 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
148
145
|
return value;
|
|
149
146
|
}
|
|
150
147
|
});
|
|
151
|
-
(0, _defineProperty2["default"])(
|
|
148
|
+
(0, _defineProperty2["default"])(_this, "controlProps", function (_ref2) {
|
|
152
149
|
var type = _ref2.type,
|
|
153
150
|
value = _ref2.value,
|
|
154
151
|
_ref2$props = _ref2.props,
|
|
@@ -171,7 +168,8 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
171
168
|
});
|
|
172
169
|
return _this;
|
|
173
170
|
}
|
|
174
|
-
(0,
|
|
171
|
+
(0, _inherits2["default"])(SuperTableCell, _React$Component);
|
|
172
|
+
return (0, _createClass2["default"])(SuperTableCell, [{
|
|
175
173
|
key: "render",
|
|
176
174
|
value: function render() {
|
|
177
175
|
var props = this.controlProps(this.props);
|
|
@@ -225,7 +223,6 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
225
223
|
}
|
|
226
224
|
}
|
|
227
225
|
}]);
|
|
228
|
-
return SuperTableCell;
|
|
229
226
|
}(_react["default"].Component);
|
|
230
227
|
(0, _defineProperty2["default"])(SuperTableCell, "propTypes", {
|
|
231
228
|
type: _propTypes["default"].string.isRequired,
|
|
@@ -12,33 +12,30 @@ var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
|
12
12
|
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
13
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
14
14
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
15
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
17
15
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
18
16
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
17
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
19
18
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
20
19
|
var _react = _interopRequireDefault(require("react"));
|
|
21
20
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
22
21
|
var _Control = _interopRequireDefault(require("../Control/Control"));
|
|
23
22
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
24
|
-
function
|
|
25
|
-
function _isNativeReflectConstruct() {
|
|
23
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
24
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
25
|
var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
27
|
-
(0, _inherits2["default"])(FilterDropDown, _React$Component);
|
|
28
|
-
var _super = _createSuper(FilterDropDown);
|
|
29
26
|
function FilterDropDown(_props) {
|
|
30
27
|
var _this;
|
|
31
28
|
(0, _classCallCheck2["default"])(this, FilterDropDown);
|
|
32
|
-
_this =
|
|
33
|
-
(0, _defineProperty2["default"])(
|
|
29
|
+
_this = _callSuper(this, FilterDropDown, [_props]);
|
|
30
|
+
(0, _defineProperty2["default"])(_this, "onChange", function (e) {
|
|
34
31
|
_this.setState({
|
|
35
32
|
value: e.target.value
|
|
36
33
|
});
|
|
37
34
|
});
|
|
38
|
-
(0, _defineProperty2["default"])(
|
|
35
|
+
(0, _defineProperty2["default"])(_this, "onDateChange", function (key, value) {
|
|
39
36
|
_this.setState((0, _defineProperty2["default"])({}, key, value));
|
|
40
37
|
});
|
|
41
|
-
(0, _defineProperty2["default"])(
|
|
38
|
+
(0, _defineProperty2["default"])(_this, "onSearch", function () {
|
|
42
39
|
var _this$props = _this.props,
|
|
43
40
|
onSearch = _this$props.onSearch,
|
|
44
41
|
isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
|
|
@@ -48,7 +45,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
48
45
|
onSearch(val);
|
|
49
46
|
}
|
|
50
47
|
});
|
|
51
|
-
(0, _defineProperty2["default"])(
|
|
48
|
+
(0, _defineProperty2["default"])(_this, "DateInputCreator", function () {
|
|
52
49
|
var _context, _context2, _context3;
|
|
53
50
|
var props = _this.props.props;
|
|
54
51
|
var propsStart = {
|
|
@@ -85,7 +82,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
85
82
|
onClick: (0, _bind["default"])(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
|
|
86
83
|
}, "\u641C\u7D22")));
|
|
87
84
|
});
|
|
88
|
-
(0, _defineProperty2["default"])(
|
|
85
|
+
(0, _defineProperty2["default"])(_this, "InputCreator", function () {
|
|
89
86
|
var props = {
|
|
90
87
|
size: 'small',
|
|
91
88
|
value: _this.state.value,
|
|
@@ -123,7 +120,8 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
123
120
|
}
|
|
124
121
|
return _this;
|
|
125
122
|
}
|
|
126
|
-
(0,
|
|
123
|
+
(0, _inherits2["default"])(FilterDropDown, _React$Component);
|
|
124
|
+
return (0, _createClass2["default"])(FilterDropDown, [{
|
|
127
125
|
key: "componentWillReceiveProps",
|
|
128
126
|
value: function componentWillReceiveProps(newProps) {
|
|
129
127
|
if (newProps.isDateFilterByStartAndEnd) {
|
|
@@ -162,7 +160,6 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
162
160
|
return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
|
|
163
161
|
}
|
|
164
162
|
}]);
|
|
165
|
-
return FilterDropDown;
|
|
166
163
|
}(_react["default"].Component);
|
|
167
164
|
(0, _defineProperty2["default"])(FilterDropDown, "propTypes", {
|
|
168
165
|
value: _propTypes["default"].any,
|
|
@@ -36,10 +36,9 @@ var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime-
|
|
|
36
36
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
37
37
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
38
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
39
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
42
40
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
41
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
43
42
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
44
43
|
var _react = _interopRequireDefault(require("react"));
|
|
45
44
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -50,9 +49,9 @@ var _fixed = _interopRequireDefault(require("./fixed"));
|
|
|
50
49
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
51
50
|
var _excluded = ["onRowClick"];
|
|
52
51
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty2(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
53
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
54
|
-
function
|
|
55
|
-
function _isNativeReflectConstruct() {
|
|
52
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context1, _context10; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty2(_context1 = ownKeys(Object(t), !0)).call(_context1, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty2(_context10 = ownKeys(Object(t))).call(_context10, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
53
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
54
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
56
55
|
/**
|
|
57
56
|
* sorter: [可选],不传表示该列不支持排序;为string表示按字符串排序;为number表示按数字大小排序
|
|
58
57
|
* filter: [可选],是否支持过滤,默认为false
|
|
@@ -106,8 +105,6 @@ var CallbackType = {
|
|
|
106
105
|
* childrenKey: [可选],设置子列表数据的key,默认children
|
|
107
106
|
*/
|
|
108
107
|
var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
109
|
-
(0, _inherits2["default"])(SuperTable, _React$Component);
|
|
110
|
-
var _super = _createSuper(SuperTable);
|
|
111
108
|
function SuperTable() {
|
|
112
109
|
var _context;
|
|
113
110
|
var _this;
|
|
@@ -115,18 +112,18 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
115
112
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
116
113
|
args[_key] = arguments[_key];
|
|
117
114
|
}
|
|
118
|
-
_this =
|
|
119
|
-
(0, _defineProperty2["default"])(
|
|
115
|
+
_this = _callSuper(this, SuperTable, (0, _concat["default"])(_context = []).call(_context, args));
|
|
116
|
+
(0, _defineProperty2["default"])(_this, "state", {
|
|
120
117
|
filterVisibleKey: ''
|
|
121
118
|
});
|
|
122
|
-
(0, _defineProperty2["default"])(
|
|
119
|
+
(0, _defineProperty2["default"])(_this, "onTableChange", function (pagination, filters, sorter) {
|
|
123
120
|
var _ref = _this.props.callback || {},
|
|
124
121
|
onTableChange = _ref.onTableChange;
|
|
125
122
|
var _this$props$filterInf = _this.props.filterInfo,
|
|
126
123
|
filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
|
|
127
124
|
onTableChange && onTableChange(sorter, filterInfo);
|
|
128
125
|
});
|
|
129
|
-
(0, _defineProperty2["default"])(
|
|
126
|
+
(0, _defineProperty2["default"])(_this, "onChange", function () {
|
|
130
127
|
var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
131
128
|
var _ref2 = _this.props.callback || {},
|
|
132
129
|
onCheck = _ref2.onCheck;
|
|
@@ -162,22 +159,22 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
162
159
|
}
|
|
163
160
|
}
|
|
164
161
|
});
|
|
165
|
-
(0, _defineProperty2["default"])(
|
|
162
|
+
(0, _defineProperty2["default"])(_this, "onCheckChange", function (selectedKeys) {
|
|
166
163
|
var _ref3 = _this.props.callback || {},
|
|
167
164
|
onCheck = _ref3.onCheck;
|
|
168
165
|
onCheck && onCheck(selectedKeys);
|
|
169
166
|
});
|
|
170
|
-
(0, _defineProperty2["default"])(
|
|
167
|
+
(0, _defineProperty2["default"])(_this, "onRadioChange", function (selectedKeys) {
|
|
171
168
|
var _ref4 = _this.props.callback || {},
|
|
172
169
|
onRadio = _ref4.onRadio;
|
|
173
170
|
onRadio && onRadio(selectedKeys);
|
|
174
171
|
});
|
|
175
|
-
(0, _defineProperty2["default"])(
|
|
172
|
+
(0, _defineProperty2["default"])(_this, "onRadioRowClick", function (record) {
|
|
176
173
|
var _ref5 = _this.props.callback || {},
|
|
177
174
|
onRadio = _ref5.onRadio;
|
|
178
175
|
onRadio && onRadio([record.key]);
|
|
179
176
|
});
|
|
180
|
-
(0, _defineProperty2["default"])(
|
|
177
|
+
(0, _defineProperty2["default"])(_this, "onRowClick", function (record) {
|
|
181
178
|
var items = _this.props.items;
|
|
182
179
|
if (items.length <= record.key) return;
|
|
183
180
|
clearTimeout(_this.timer);
|
|
@@ -197,28 +194,28 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
197
194
|
}
|
|
198
195
|
}, 250);
|
|
199
196
|
});
|
|
200
|
-
(0, _defineProperty2["default"])(
|
|
197
|
+
(0, _defineProperty2["default"])(_this, "onDoubleClick", function (record) {
|
|
201
198
|
clearTimeout(_this.timer);
|
|
202
199
|
var _ref7 = _this.props.callback || {},
|
|
203
200
|
onDoubleClick = _ref7.onDoubleClick;
|
|
204
201
|
onDoubleClick && onDoubleClick(record.key);
|
|
205
202
|
});
|
|
206
|
-
(0, _defineProperty2["default"])(
|
|
203
|
+
(0, _defineProperty2["default"])(_this, "onLink", function (key, index, item, e) {
|
|
207
204
|
var _ref8 = _this.props.callback || {},
|
|
208
205
|
onLink = _ref8.onLink;
|
|
209
206
|
onLink && onLink(key, index, item);
|
|
210
207
|
e.stopPropagation();
|
|
211
208
|
});
|
|
212
|
-
(0, _defineProperty2["default"])(
|
|
209
|
+
(0, _defineProperty2["default"])(_this, "onLinkDouble", function (e) {
|
|
213
210
|
e.stopPropagation();
|
|
214
211
|
});
|
|
215
|
-
(0, _defineProperty2["default"])(
|
|
212
|
+
(0, _defineProperty2["default"])(_this, "getSelectedRowKeys", function (items) {
|
|
216
213
|
return (0, _reduce["default"])(items).call(items, function (result, item, index) {
|
|
217
214
|
item.checked && result.push(index);
|
|
218
215
|
return result;
|
|
219
216
|
}, []);
|
|
220
217
|
});
|
|
221
|
-
(0, _defineProperty2["default"])(
|
|
218
|
+
(0, _defineProperty2["default"])(_this, "getIndexInfo", function () {
|
|
222
219
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
223
220
|
var _this$props = _this.props,
|
|
224
221
|
_this$props$index = _this$props.index,
|
|
@@ -233,7 +230,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
233
230
|
}
|
|
234
231
|
}] : [];
|
|
235
232
|
});
|
|
236
|
-
(0, _defineProperty2["default"])(
|
|
233
|
+
(0, _defineProperty2["default"])(_this, "setSortInfo", function (col, sortInfo) {
|
|
237
234
|
if (col.sorter === 'string') {
|
|
238
235
|
col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
|
|
239
236
|
col.sorter = function (row1, row2) {
|
|
@@ -256,7 +253,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
256
253
|
delete col.sorter;
|
|
257
254
|
}
|
|
258
255
|
});
|
|
259
|
-
(0, _defineProperty2["default"])(
|
|
256
|
+
(0, _defineProperty2["default"])(_this, "setFilterInfo", function (col, filterInfo, visibleKey) {
|
|
260
257
|
if ((0, _filter["default"])(col)) {
|
|
261
258
|
var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
|
|
262
259
|
isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
|
|
@@ -308,7 +305,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
308
305
|
}
|
|
309
306
|
delete col.filter;
|
|
310
307
|
});
|
|
311
|
-
(0, _defineProperty2["default"])(
|
|
308
|
+
(0, _defineProperty2["default"])(_this, "linkList", function (key, index, item) {
|
|
312
309
|
var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
|
|
313
310
|
var list = item[key] || [];
|
|
314
311
|
return /*#__PURE__*/_react["default"].createElement("div", null, (0, _map["default"])(list).call(list, function (item2, index2) {
|
|
@@ -322,7 +319,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
322
319
|
}, (0, _concat["default"])(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
|
|
323
320
|
}));
|
|
324
321
|
});
|
|
325
|
-
(0, _defineProperty2["default"])(
|
|
322
|
+
(0, _defineProperty2["default"])(_this, "waring", function (key, index, item, warningKey) {
|
|
326
323
|
var text = item[key] ? item[key] : '';
|
|
327
324
|
var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
|
|
328
325
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", {
|
|
@@ -331,7 +328,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
331
328
|
}
|
|
332
329
|
}, text.title ? text.title : text));
|
|
333
330
|
});
|
|
334
|
-
(0, _defineProperty2["default"])(
|
|
331
|
+
(0, _defineProperty2["default"])(_this, "defaultList", function (key, index, item, text, link) {
|
|
335
332
|
var _context4;
|
|
336
333
|
var onClick = (0, _bind["default"])(_context4 = _this.onLink).call(_context4, null, key, index, item);
|
|
337
334
|
if (link && typeof link === 'string') {
|
|
@@ -342,7 +339,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
342
339
|
}
|
|
343
340
|
return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("p", null, text));
|
|
344
341
|
});
|
|
345
|
-
(0, _defineProperty2["default"])(
|
|
342
|
+
(0, _defineProperty2["default"])(_this, "getColumns", function (cols, items) {
|
|
346
343
|
var _context5, _context6;
|
|
347
344
|
var _this$props2 = _this.props,
|
|
348
345
|
sortInfo = _this$props2.sortInfo,
|
|
@@ -350,8 +347,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
350
347
|
var filterVisibleKey = _this.state.filterVisibleKey;
|
|
351
348
|
return (0, _map["default"])(_context5 = (0, _concat["default"])(_context6 = _this.getIndexInfo(items)).call(_context6, (0, _filter["default"])(cols).call(cols, function (col) {
|
|
352
349
|
return !col.hide;
|
|
353
|
-
}))).call(_context5, function (
|
|
354
|
-
var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(
|
|
350
|
+
}))).call(_context5, function (_ref0) {
|
|
351
|
+
var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref0), _ref0));
|
|
355
352
|
col.dataIndex = col.key;
|
|
356
353
|
col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? s[col.align] : '';
|
|
357
354
|
col.noWrap && (col.className = (0, _variables["default"])('SuperTable3').noWrap);
|
|
@@ -381,7 +378,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
381
378
|
return col;
|
|
382
379
|
});
|
|
383
380
|
});
|
|
384
|
-
(0, _defineProperty2["default"])(
|
|
381
|
+
(0, _defineProperty2["default"])(_this, "getText", function (value, options) {
|
|
385
382
|
if ((0, _isArray["default"])(value)) {
|
|
386
383
|
return (0, _map["default"])(value).call(value, function (v) {
|
|
387
384
|
return (0, _Control.getTitle)(v, options);
|
|
@@ -390,7 +387,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
390
387
|
return (0, _Control.getTitle)(value, options);
|
|
391
388
|
}
|
|
392
389
|
});
|
|
393
|
-
(0, _defineProperty2["default"])(
|
|
390
|
+
(0, _defineProperty2["default"])(_this, "link", function (key, index, item, text) {
|
|
394
391
|
var _context7;
|
|
395
392
|
var onClick = (0, _bind["default"])(_context7 = _this.onLink).call(_context7, null, key, index, item);
|
|
396
393
|
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
@@ -398,16 +395,16 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
398
395
|
onDoubleClick: _this.onLinkDouble
|
|
399
396
|
}, text);
|
|
400
397
|
});
|
|
401
|
-
(0, _defineProperty2["default"])(
|
|
402
|
-
var tipLen =
|
|
403
|
-
options =
|
|
398
|
+
(0, _defineProperty2["default"])(_this, "tooltip", function (key, index, item, _ref1) {
|
|
399
|
+
var tipLen = _ref1.tooltip,
|
|
400
|
+
options = _ref1.options;
|
|
404
401
|
var text = _this.getText(item[key], options);
|
|
405
402
|
var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
|
|
406
403
|
return needTip ? /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
|
|
407
404
|
title: text
|
|
408
405
|
}, /*#__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);
|
|
409
406
|
});
|
|
410
|
-
(0, _defineProperty2["default"])(
|
|
407
|
+
(0, _defineProperty2["default"])(_this, "getImgSrc", function (value, options) {
|
|
411
408
|
var index = (0, _findIndex["default"])(options).call(options, function (obj) {
|
|
412
409
|
return obj.value == value;
|
|
413
410
|
});
|
|
@@ -420,7 +417,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
420
417
|
* @param options{array}:字段options
|
|
421
418
|
* @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
|
|
422
419
|
*/
|
|
423
|
-
(0, _defineProperty2["default"])(
|
|
420
|
+
(0, _defineProperty2["default"])(_this, "getSourceText", function (item, key, options, dataSource) {
|
|
424
421
|
var value = {};
|
|
425
422
|
if (typeof dataSource === 'string') {
|
|
426
423
|
value = item[dataSource] || {};
|
|
@@ -440,14 +437,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
440
437
|
}
|
|
441
438
|
return _this.getText(value, options);
|
|
442
439
|
});
|
|
443
|
-
(0, _defineProperty2["default"])(
|
|
440
|
+
(0, _defineProperty2["default"])(_this, "getDataSource", function (items, cols) {
|
|
444
441
|
var getItemObj = function getItemObj(item, index) {
|
|
445
|
-
return (0, _reduce["default"])(cols).call(cols, function (result,
|
|
446
|
-
var key =
|
|
447
|
-
options =
|
|
448
|
-
link =
|
|
449
|
-
icon =
|
|
450
|
-
dataSource =
|
|
442
|
+
return (0, _reduce["default"])(cols).call(cols, function (result, _ref10) {
|
|
443
|
+
var key = _ref10.key,
|
|
444
|
+
options = _ref10.options,
|
|
445
|
+
link = _ref10.link,
|
|
446
|
+
icon = _ref10.icon,
|
|
447
|
+
dataSource = _ref10.dataSource;
|
|
451
448
|
if (link) {
|
|
452
449
|
if (typeof link === 'boolean') {
|
|
453
450
|
result[key] = _this.link(key, index, item, _this.getText(item[key], options));
|
|
@@ -476,14 +473,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
476
473
|
var _context9;
|
|
477
474
|
return _objectSpread(_objectSpread({}, getItemObj(item, index)), {}, {
|
|
478
475
|
children: item.children ? (0, _map["default"])(_context9 = item.children).call(_context9, function (item2, index2) {
|
|
479
|
-
var
|
|
480
|
-
return getItemObj(item2, (0, _concat["default"])(
|
|
476
|
+
var _context0;
|
|
477
|
+
return getItemObj(item2, (0, _concat["default"])(_context0 = "".concat(index, "-")).call(_context0, index2));
|
|
481
478
|
}) : null
|
|
482
479
|
});
|
|
483
480
|
});
|
|
484
481
|
return data;
|
|
485
482
|
});
|
|
486
|
-
(0, _defineProperty2["default"])(
|
|
483
|
+
(0, _defineProperty2["default"])(_this, "getPropsByCheckbox", function () {
|
|
487
484
|
var _this$props3 = _this.props,
|
|
488
485
|
_this$props3$checkbox = _this$props3.checkbox,
|
|
489
486
|
checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
|
|
@@ -509,7 +506,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
509
506
|
};
|
|
510
507
|
}
|
|
511
508
|
});
|
|
512
|
-
(0, _defineProperty2["default"])(
|
|
509
|
+
(0, _defineProperty2["default"])(_this, "getRowProps", function (onRowClick) {
|
|
513
510
|
return function (record) {
|
|
514
511
|
return {
|
|
515
512
|
onClick: function onClick() {
|
|
@@ -521,7 +518,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
521
518
|
};
|
|
522
519
|
};
|
|
523
520
|
});
|
|
524
|
-
(0, _defineProperty2["default"])(
|
|
521
|
+
(0, _defineProperty2["default"])(_this, "getItems", function () {
|
|
525
522
|
var _this$props4 = _this.props,
|
|
526
523
|
items = _this$props4.items,
|
|
527
524
|
childrenKey = _this$props4.childrenKey;
|
|
@@ -535,7 +532,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
535
532
|
}
|
|
536
533
|
return resItems;
|
|
537
534
|
});
|
|
538
|
-
(0, _defineProperty2["default"])(
|
|
535
|
+
(0, _defineProperty2["default"])(_this, "toTotalFooter", function () {
|
|
539
536
|
var _this$props5 = _this.props,
|
|
540
537
|
cols = _this$props5.cols,
|
|
541
538
|
items = _this$props5.items,
|
|
@@ -548,11 +545,11 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
548
545
|
return (0, _includes["default"])(checkedRows).call(checkedRows, index);
|
|
549
546
|
});
|
|
550
547
|
var countItems = checkedItems.length ? checkedItems : items;
|
|
551
|
-
var totalItems = (0, _map["default"])(totalCols).call(totalCols, function (
|
|
552
|
-
var title =
|
|
553
|
-
key =
|
|
554
|
-
|
|
555
|
-
props =
|
|
548
|
+
var totalItems = (0, _map["default"])(totalCols).call(totalCols, function (_ref11) {
|
|
549
|
+
var title = _ref11.title,
|
|
550
|
+
key = _ref11.key,
|
|
551
|
+
_ref11$props = _ref11.props,
|
|
552
|
+
props = _ref11$props === void 0 ? {} : _ref11$props;
|
|
556
553
|
var value = (0, _reduce["default"])(countItems).call(countItems, function (result, item) {
|
|
557
554
|
return (0, _parseFloat2["default"])((result + Number(item[key] || 0)).toFixed(props.precision || 6));
|
|
558
555
|
}, 0);
|
|
@@ -570,9 +567,9 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
570
567
|
style: {
|
|
571
568
|
marginRight: "15px"
|
|
572
569
|
}
|
|
573
|
-
}, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), (0, _map["default"])(totalItems).call(totalItems, function (
|
|
574
|
-
var title =
|
|
575
|
-
value =
|
|
570
|
+
}, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), (0, _map["default"])(totalItems).call(totalItems, function (_ref12, index) {
|
|
571
|
+
var title = _ref12.title,
|
|
572
|
+
value = _ref12.value;
|
|
576
573
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
577
574
|
key: index,
|
|
578
575
|
style: {
|
|
@@ -588,7 +585,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
588
585
|
return null;
|
|
589
586
|
}
|
|
590
587
|
});
|
|
591
|
-
(0, _defineProperty2["default"])(
|
|
588
|
+
(0, _defineProperty2["default"])(_this, "getProps", function () {
|
|
592
589
|
var _this$props6 = _this.props,
|
|
593
590
|
cols = _this$props6.cols,
|
|
594
591
|
_this$props6$isPaging = _this$props6.isPaging,
|
|
@@ -615,10 +612,10 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
615
612
|
}, extraProps);
|
|
616
613
|
return renderProps;
|
|
617
614
|
});
|
|
618
|
-
(0, _defineProperty2["default"])(
|
|
615
|
+
(0, _defineProperty2["default"])(_this, "setScroll", function () {
|
|
619
616
|
var maxHeight = _this.props.maxHeight;
|
|
620
617
|
if (maxHeight && _this.getItems().length) {
|
|
621
|
-
var root = _reactDom["default"].findDOMNode(
|
|
618
|
+
var root = _reactDom["default"].findDOMNode(_this);
|
|
622
619
|
var container = root.getElementsByClassName('ant-table-body')[0];
|
|
623
620
|
var header = root.getElementsByClassName('ant-table-thead')[0];
|
|
624
621
|
(0, _fixed["default"])(container, header, maxHeight);
|
|
@@ -626,7 +623,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
626
623
|
});
|
|
627
624
|
return _this;
|
|
628
625
|
}
|
|
629
|
-
(0,
|
|
626
|
+
(0, _inherits2["default"])(SuperTable, _React$Component);
|
|
627
|
+
return (0, _createClass2["default"])(SuperTable, [{
|
|
630
628
|
key: "shouldComponentUpdate",
|
|
631
629
|
value: function shouldComponentUpdate(props, state) {
|
|
632
630
|
var _this2 = this;
|
|
@@ -653,7 +651,6 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
653
651
|
}));
|
|
654
652
|
}
|
|
655
653
|
}]);
|
|
656
|
-
return SuperTable;
|
|
657
654
|
}(_react["default"].Component);
|
|
658
655
|
(0, _defineProperty2["default"])(SuperTable, "propTypes", {
|
|
659
656
|
cols: _propTypes["default"].arrayOf(_propTypes["default"].shape(ColType)).isRequired,
|