cloud-b2b 1.1.80 → 1.1.82
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 +16 -11
- package/es/CodeInput/CodeInput.js +19 -16
- package/es/Control/Control.js +4 -1
- package/es/Enhance/Dialogs.js +14 -11
- package/es/Enhance/Loading.js +18 -15
- package/es/Header/Header.js +20 -17
- package/es/Header/Vertical.js +14 -11
- package/es/ImageView/ImageView.js +13 -10
- package/es/InpurCascader/InputCascader.js +14 -11
- package/es/InputEditor/InputEditor.js +18 -16
- package/es/InputSearch/InputSearch.js +23 -20
- package/es/InputSelect/InputSelect.js +17 -14
- package/es/InputTreeSelect/InputTreeSelect.js +13 -10
- package/es/InputWriting/InputWriting.js +15 -12
- package/es/Layout/Layout.js +17 -14
- package/es/Link/Link.js +10 -7
- package/es/NumberInput/NumberInput.js +16 -13
- package/es/Search/Search.js +55 -52
- package/es/Search2/Search.js +86 -83
- package/es/Search2/Search.less +64 -64
- package/es/Search2/package.json +6 -6
- package/es/Sidebar/Sidebar.js +14 -11
- package/es/Sidebar2/Sidebar.js +16 -13
- package/es/SuperForm/SuperForm.js +79 -74
- package/es/SuperForm2/SuperForm.js +114 -108
- package/es/SuperPagination/SuperPagination.js +11 -8
- package/es/SuperTab/SuperTab.js +15 -12
- package/es/SuperTab2/SuperTab2.js +16 -13
- package/es/SuperTable/DragSortRow.js +15 -12
- package/es/SuperTable/FilterDropDown.js +14 -11
- package/es/SuperTable/SuperTable.js +73 -70
- package/es/SuperTable2/SuperTable2.js +92 -89
- package/es/SuperTable2/SuperTableCell.js +30 -27
- package/es/SuperTable3/FilterDropDown.js +14 -11
- package/es/SuperTable3/SuperTable.js +61 -58
- package/es/SuperToolbar/SuperToolbar.js +15 -12
- package/es/SuperUpload/SuperUpload.js +38 -38
- package/es/Viewer/ImageViews.js +19 -16
- package/es/Viewer/Viewer.js +14 -11
- package/es/helper.js +17 -18
- package/lib/Area/Area.js +16 -11
- package/lib/CodeInput/CodeInput.js +19 -16
- package/lib/Control/Control.js +4 -1
- package/lib/Enhance/Dialogs.js +14 -11
- package/lib/Enhance/Loading.js +18 -15
- package/lib/Header/Header.js +20 -17
- package/lib/Header/Vertical.js +14 -11
- package/lib/ImageView/ImageView.js +13 -10
- package/lib/InpurCascader/InputCascader.js +14 -11
- package/lib/InputEditor/InputEditor.js +18 -16
- package/lib/InputSearch/InputSearch.js +23 -20
- package/lib/InputSelect/InputSelect.js +17 -14
- package/lib/InputTreeSelect/InputTreeSelect.js +13 -10
- package/lib/InputWriting/InputWriting.js +15 -12
- package/lib/Layout/Layout.js +17 -14
- package/lib/LayoutLink/LayoutLink.js +2 -1
- package/lib/Link/Link.js +10 -7
- package/lib/NumberInput/NumberInput.js +16 -13
- package/lib/Search/Search.js +57 -53
- package/lib/Search2/Search.js +88 -84
- package/lib/Search2/Search.less +64 -64
- package/lib/Search2/package.json +6 -6
- package/lib/Sidebar/Sidebar.js +14 -11
- package/lib/Sidebar2/Sidebar.js +16 -13
- package/lib/SuperForm/SuperForm.js +81 -75
- package/lib/SuperForm2/SuperForm.js +116 -109
- package/lib/SuperPagination/SuperPagination.js +11 -8
- package/lib/SuperTab/SuperTab.js +15 -12
- package/lib/SuperTab2/SuperTab2.js +16 -13
- package/lib/SuperTable/DragSortRow.js +15 -12
- package/lib/SuperTable/FilterDropDown.js +14 -11
- package/lib/SuperTable/SuperTable.js +73 -70
- package/lib/SuperTable2/SuperTable2.js +94 -90
- package/lib/SuperTable2/SuperTableCell.js +30 -27
- package/lib/SuperTable3/FilterDropDown.js +14 -11
- package/lib/SuperTable3/SuperTable.js +61 -58
- package/lib/SuperToolbar/SuperToolbar.js +15 -12
- package/lib/SuperUpload/SuperUpload.js +40 -39
- package/lib/Viewer/ImageViews.js +19 -16
- package/lib/Viewer/Viewer.js +14 -11
- package/lib/helper.js +17 -18
- package/package.json +1 -1
|
@@ -9,16 +9,17 @@ import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/obje
|
|
|
9
9
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
10
10
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
11
11
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
12
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
13
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
12
14
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
13
15
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
14
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
15
16
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
16
17
|
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; }
|
|
17
18
|
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) { _defineProperty(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; }
|
|
18
19
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
19
20
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
20
|
-
function
|
|
21
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
22
|
+
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; } }
|
|
22
23
|
import React from 'react';
|
|
23
24
|
import PropTypes from 'prop-types';
|
|
24
25
|
import ReactDOM from 'react-dom';
|
|
@@ -39,6 +40,8 @@ var isInRegion = function isInRegion(target, _ref) {
|
|
|
39
40
|
return !(x < left || x > right || y < top || y > bottom);
|
|
40
41
|
};
|
|
41
42
|
var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
43
|
+
_inherits(SuperTableCell, _React$Component);
|
|
44
|
+
var _super = _createSuper(SuperTableCell);
|
|
42
45
|
function SuperTableCell() {
|
|
43
46
|
var _context;
|
|
44
47
|
var _this;
|
|
@@ -46,19 +49,19 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
46
49
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
47
50
|
args[_key] = arguments[_key];
|
|
48
51
|
}
|
|
49
|
-
_this =
|
|
50
|
-
_defineProperty(_this, "onDateBlur", function (value, event) {
|
|
52
|
+
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "onDateBlur", function (value, event) {
|
|
51
54
|
if (!isInRegion(event.target, global.mousePos)) {
|
|
52
55
|
_this.props.onBlur();
|
|
53
56
|
}
|
|
54
57
|
});
|
|
55
|
-
_defineProperty(_this, "onChange", function (key, value) {
|
|
58
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (key, value) {
|
|
56
59
|
var onChange = _this.props.onChange;
|
|
57
60
|
if (onChange) {
|
|
58
61
|
onChange(key, value);
|
|
59
62
|
}
|
|
60
63
|
});
|
|
61
|
-
_defineProperty(_this, "onOpenChange", function (open) {
|
|
64
|
+
_defineProperty(_assertThisInitialized(_this), "onOpenChange", function (open) {
|
|
62
65
|
if (!open) {
|
|
63
66
|
var targets = document.getElementsByClassName('ant-calendar-picker-container');
|
|
64
67
|
if (!isInRegion(targets[0], global.mousePos)) {
|
|
@@ -66,71 +69,71 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
});
|
|
69
|
-
_defineProperty(_this, "options", function () {
|
|
72
|
+
_defineProperty(_assertThisInitialized(_this), "options", function () {
|
|
70
73
|
return _this.props.options || _this.props.typeRelated || [];
|
|
71
74
|
});
|
|
72
|
-
_defineProperty(_this, "getPopupContainer", function () {
|
|
73
|
-
return ReactDOM.findDOMNode(_this);
|
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "getPopupContainer", function () {
|
|
76
|
+
return ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
74
77
|
});
|
|
75
|
-
_defineProperty(_this, "toTextComponent", function (props) {
|
|
78
|
+
_defineProperty(_assertThisInitialized(_this), "toTextComponent", function (props) {
|
|
76
79
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
77
80
|
});
|
|
78
|
-
_defineProperty(_this, "toTextAreaComponent", function (props) {
|
|
81
|
+
_defineProperty(_assertThisInitialized(_this), "toTextAreaComponent", function (props) {
|
|
79
82
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
80
83
|
});
|
|
81
|
-
_defineProperty(_this, "toReadonlyComponent", function (props) {
|
|
84
|
+
_defineProperty(_assertThisInitialized(_this), "toReadonlyComponent", function (props) {
|
|
82
85
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
83
86
|
});
|
|
84
|
-
_defineProperty(_this, "toNumberComponent", function (props) {
|
|
87
|
+
_defineProperty(_assertThisInitialized(_this), "toNumberComponent", function (props) {
|
|
85
88
|
props.defaultValue = props.value;
|
|
86
89
|
delete props.value;
|
|
87
90
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
88
91
|
});
|
|
89
|
-
_defineProperty(_this, "toDoubleNumberComponent", function (props, cc) {
|
|
92
|
+
_defineProperty(_assertThisInitialized(_this), "toDoubleNumberComponent", function (props, cc) {
|
|
90
93
|
var _context2, _context3;
|
|
91
94
|
props.defaultValue = props.value;
|
|
92
95
|
props.doubleKey = props.key;
|
|
93
96
|
props.doubleValue = helper.getObject(cc, props.key);
|
|
94
|
-
props.onChangeKey1 = _bindInstanceProperty(_context2 = _this.onChange).call(_context2, _this, props.key[0]);
|
|
95
|
-
props.onChangeKey2 = _bindInstanceProperty(_context3 = _this.onChange).call(_context3, _this, props.key[1]);
|
|
97
|
+
props.onChangeKey1 = _bindInstanceProperty(_context2 = _this.onChange).call(_context2, _assertThisInitialized(_this), props.key[0]);
|
|
98
|
+
props.onChangeKey2 = _bindInstanceProperty(_context3 = _this.onChange).call(_context3, _assertThisInitialized(_this), props.key[1]);
|
|
96
99
|
delete props.value;
|
|
97
100
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
98
101
|
});
|
|
99
|
-
_defineProperty(_this, "toDateComponent", function (props) {
|
|
102
|
+
_defineProperty(_assertThisInitialized(_this), "toDateComponent", function (props) {
|
|
100
103
|
//props.getCalendarContainer = this.getPopupContainer;
|
|
101
104
|
props.onBlur = _this.onDateBlur;
|
|
102
105
|
props.onOpenChange = _this.onOpenChange;
|
|
103
106
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
104
107
|
});
|
|
105
|
-
_defineProperty(_this, "toSelectComponent", function (props) {
|
|
108
|
+
_defineProperty(_assertThisInitialized(_this), "toSelectComponent", function (props) {
|
|
106
109
|
props.options = _this.options();
|
|
107
110
|
props.dropdownMatchSelectWidth = false;
|
|
108
111
|
//props.getPopupContainer = this.getPopupContainer;
|
|
109
112
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
110
113
|
});
|
|
111
|
-
_defineProperty(_this, "toSearchComponent", function (props) {
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "toSearchComponent", function (props) {
|
|
112
115
|
props.options = _this.options();
|
|
113
116
|
//props.getPopupContainer = this.getPopupContainer;
|
|
114
117
|
props.onSearch = _this.props.onSearch;
|
|
115
118
|
props.dropdownMatchSelectWidth = false;
|
|
116
119
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
117
120
|
});
|
|
118
|
-
_defineProperty(_this, "toCascader", function (props) {
|
|
121
|
+
_defineProperty(_assertThisInitialized(_this), "toCascader", function (props) {
|
|
119
122
|
props.options = _this.options() || [];
|
|
120
123
|
props.onSearch = _this.props.onSearch;
|
|
121
124
|
props.loadData = _this.props.onSearch;
|
|
122
125
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
123
126
|
});
|
|
124
|
-
_defineProperty(_this, "toSelectWriting", function (props) {
|
|
127
|
+
_defineProperty(_assertThisInitialized(_this), "toSelectWriting", function (props) {
|
|
125
128
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
126
129
|
});
|
|
127
|
-
_defineProperty(_this, "toRadioGroup", function (props) {
|
|
130
|
+
_defineProperty(_assertThisInitialized(_this), "toRadioGroup", function (props) {
|
|
128
131
|
console.log(props);
|
|
129
132
|
props.options = _this.options();
|
|
130
133
|
return /*#__PURE__*/React.createElement(Control, props);
|
|
131
134
|
});
|
|
132
135
|
// 确保value的值为字符串(包含value和title的对象除外)
|
|
133
|
-
_defineProperty(_this, "makeString", function (value) {
|
|
136
|
+
_defineProperty(_assertThisInitialized(_this), "makeString", function (value) {
|
|
134
137
|
if (value === null || typeof value === 'undefined') {
|
|
135
138
|
return '';
|
|
136
139
|
} else if (typeof value === 'number') {
|
|
@@ -139,7 +142,7 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
139
142
|
return value;
|
|
140
143
|
}
|
|
141
144
|
});
|
|
142
|
-
_defineProperty(_this, "controlProps", function (_ref2) {
|
|
145
|
+
_defineProperty(_assertThisInitialized(_this), "controlProps", function (_ref2) {
|
|
143
146
|
var type = _ref2.type,
|
|
144
147
|
value = _ref2.value,
|
|
145
148
|
_ref2$props = _ref2.props,
|
|
@@ -162,8 +165,7 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
162
165
|
});
|
|
163
166
|
return _this;
|
|
164
167
|
}
|
|
165
|
-
|
|
166
|
-
return _createClass(SuperTableCell, [{
|
|
168
|
+
_createClass(SuperTableCell, [{
|
|
167
169
|
key: "render",
|
|
168
170
|
value: function render() {
|
|
169
171
|
var props = this.controlProps(this.props);
|
|
@@ -217,6 +219,7 @@ var SuperTableCell = /*#__PURE__*/function (_React$Component) {
|
|
|
217
219
|
}
|
|
218
220
|
}
|
|
219
221
|
}]);
|
|
222
|
+
return SuperTableCell;
|
|
220
223
|
}(React.Component);
|
|
221
224
|
_defineProperty(SuperTableCell, "propTypes", {
|
|
222
225
|
type: PropTypes.string.isRequired,
|
|
@@ -3,31 +3,34 @@ import _Input from "antd/es/input";
|
|
|
3
3
|
import _Button from "antd/es/button";
|
|
4
4
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
5
5
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
6
8
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
7
9
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
8
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
9
10
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
10
11
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
11
|
-
function
|
|
12
|
-
function _isNativeReflectConstruct() {
|
|
12
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
13
|
+
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; } }
|
|
13
14
|
import React from 'react';
|
|
14
15
|
import PropTypes from 'prop-types';
|
|
15
16
|
import Control from "../Control/Control";
|
|
16
17
|
import variables from '../variables';
|
|
17
18
|
var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
19
|
+
_inherits(FilterDropDown, _React$Component);
|
|
20
|
+
var _super = _createSuper(FilterDropDown);
|
|
18
21
|
function FilterDropDown(_props) {
|
|
19
22
|
var _this;
|
|
20
23
|
_classCallCheck(this, FilterDropDown);
|
|
21
|
-
_this =
|
|
22
|
-
_defineProperty(_this, "onChange", function (e) {
|
|
24
|
+
_this = _super.call(this, _props);
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
|
|
23
26
|
_this.setState({
|
|
24
27
|
value: e.target.value
|
|
25
28
|
});
|
|
26
29
|
});
|
|
27
|
-
_defineProperty(_this, "onDateChange", function (key, value) {
|
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "onDateChange", function (key, value) {
|
|
28
31
|
_this.setState(_defineProperty({}, key, value));
|
|
29
32
|
});
|
|
30
|
-
_defineProperty(_this, "onSearch", function () {
|
|
33
|
+
_defineProperty(_assertThisInitialized(_this), "onSearch", function () {
|
|
31
34
|
var _this$props = _this.props,
|
|
32
35
|
onSearch = _this$props.onSearch,
|
|
33
36
|
isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
|
|
@@ -37,7 +40,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
37
40
|
onSearch(val);
|
|
38
41
|
}
|
|
39
42
|
});
|
|
40
|
-
_defineProperty(_this, "DateInputCreator", function () {
|
|
43
|
+
_defineProperty(_assertThisInitialized(_this), "DateInputCreator", function () {
|
|
41
44
|
var _context, _context2, _context3;
|
|
42
45
|
var props = _this.props.props;
|
|
43
46
|
var propsStart = {
|
|
@@ -74,7 +77,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
74
77
|
onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
|
|
75
78
|
}, "\u641C\u7D22")));
|
|
76
79
|
});
|
|
77
|
-
_defineProperty(_this, "InputCreator", function () {
|
|
80
|
+
_defineProperty(_assertThisInitialized(_this), "InputCreator", function () {
|
|
78
81
|
var props = {
|
|
79
82
|
size: 'small',
|
|
80
83
|
value: _this.state.value,
|
|
@@ -112,8 +115,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
112
115
|
}
|
|
113
116
|
return _this;
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
return _createClass(FilterDropDown, [{
|
|
118
|
+
_createClass(FilterDropDown, [{
|
|
117
119
|
key: "componentWillReceiveProps",
|
|
118
120
|
value: function componentWillReceiveProps(newProps) {
|
|
119
121
|
if (newProps.isDateFilterByStartAndEnd) {
|
|
@@ -152,6 +154,7 @@ var FilterDropDown = /*#__PURE__*/function (_React$Component) {
|
|
|
152
154
|
return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
|
|
153
155
|
}
|
|
154
156
|
}]);
|
|
157
|
+
return FilterDropDown;
|
|
155
158
|
}(React.Component);
|
|
156
159
|
_defineProperty(FilterDropDown, "propTypes", {
|
|
157
160
|
value: PropTypes.any,
|
|
@@ -12,13 +12,14 @@ import _objectDestructuringEmpty from "@babel/runtime-corejs3/helpers/objectDest
|
|
|
12
12
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
13
13
|
import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
|
|
14
14
|
import _createClass from "@babel/runtime-corejs3/helpers/createClass";
|
|
15
|
+
import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
|
|
16
|
+
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
15
17
|
import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
|
|
16
18
|
import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
|
|
17
|
-
import _inherits from "@babel/runtime-corejs3/helpers/inherits";
|
|
18
19
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
19
20
|
var _excluded = ["onRowClick"];
|
|
20
21
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
22
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context11, _context12; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context11 = ownKeys(Object(t), !0)).call(_context11, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context12 = ownKeys(Object(t))).call(_context12, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
23
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
23
24
|
import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
|
|
24
25
|
import _everyInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/every";
|
|
@@ -34,8 +35,8 @@ import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance
|
|
|
34
35
|
import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
|
|
35
36
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
36
37
|
import _parseFloat from "@babel/runtime-corejs3/core-js-stable/parse-float";
|
|
37
|
-
function
|
|
38
|
-
function _isNativeReflectConstruct() {
|
|
38
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
39
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
40
|
import React from 'react';
|
|
40
41
|
import PropTypes from 'prop-types';
|
|
41
42
|
import ReactDOM from 'react-dom';
|
|
@@ -97,6 +98,8 @@ var CallbackType = {
|
|
|
97
98
|
* childrenKey: [可选],设置子列表数据的key,默认children
|
|
98
99
|
*/
|
|
99
100
|
var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
101
|
+
_inherits(SuperTable, _React$Component);
|
|
102
|
+
var _super = _createSuper(SuperTable);
|
|
100
103
|
function SuperTable() {
|
|
101
104
|
var _context;
|
|
102
105
|
var _this;
|
|
@@ -104,18 +107,18 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
104
107
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
105
108
|
args[_key] = arguments[_key];
|
|
106
109
|
}
|
|
107
|
-
_this =
|
|
108
|
-
_defineProperty(_this, "state", {
|
|
110
|
+
_this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
|
|
111
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
109
112
|
filterVisibleKey: ''
|
|
110
113
|
});
|
|
111
|
-
_defineProperty(_this, "onTableChange", function (pagination, filters, sorter) {
|
|
114
|
+
_defineProperty(_assertThisInitialized(_this), "onTableChange", function (pagination, filters, sorter) {
|
|
112
115
|
var _ref = _this.props.callback || {},
|
|
113
116
|
onTableChange = _ref.onTableChange;
|
|
114
117
|
var _this$props$filterInf = _this.props.filterInfo,
|
|
115
118
|
filterInfo = _this$props$filterInf === void 0 ? null : _this$props$filterInf;
|
|
116
119
|
onTableChange && onTableChange(sorter, filterInfo);
|
|
117
120
|
});
|
|
118
|
-
_defineProperty(_this, "onChange", function () {
|
|
121
|
+
_defineProperty(_assertThisInitialized(_this), "onChange", function () {
|
|
119
122
|
var selectedKeyArr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
120
123
|
var _ref2 = _this.props.callback || {},
|
|
121
124
|
onCheck = _ref2.onCheck;
|
|
@@ -151,22 +154,22 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
156
|
});
|
|
154
|
-
_defineProperty(_this, "onCheckChange", function (selectedKeys) {
|
|
157
|
+
_defineProperty(_assertThisInitialized(_this), "onCheckChange", function (selectedKeys) {
|
|
155
158
|
var _ref3 = _this.props.callback || {},
|
|
156
159
|
onCheck = _ref3.onCheck;
|
|
157
160
|
onCheck && onCheck(selectedKeys);
|
|
158
161
|
});
|
|
159
|
-
_defineProperty(_this, "onRadioChange", function (selectedKeys) {
|
|
162
|
+
_defineProperty(_assertThisInitialized(_this), "onRadioChange", function (selectedKeys) {
|
|
160
163
|
var _ref4 = _this.props.callback || {},
|
|
161
164
|
onRadio = _ref4.onRadio;
|
|
162
165
|
onRadio && onRadio(selectedKeys);
|
|
163
166
|
});
|
|
164
|
-
_defineProperty(_this, "onRadioRowClick", function (record) {
|
|
167
|
+
_defineProperty(_assertThisInitialized(_this), "onRadioRowClick", function (record) {
|
|
165
168
|
var _ref5 = _this.props.callback || {},
|
|
166
169
|
onRadio = _ref5.onRadio;
|
|
167
170
|
onRadio && onRadio([record.key]);
|
|
168
171
|
});
|
|
169
|
-
_defineProperty(_this, "onRowClick", function (record) {
|
|
172
|
+
_defineProperty(_assertThisInitialized(_this), "onRowClick", function (record) {
|
|
170
173
|
var items = _this.props.items;
|
|
171
174
|
if (items.length <= record.key) return;
|
|
172
175
|
clearTimeout(_this.timer);
|
|
@@ -186,28 +189,28 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
186
189
|
}
|
|
187
190
|
}, 250);
|
|
188
191
|
});
|
|
189
|
-
_defineProperty(_this, "onDoubleClick", function (record) {
|
|
192
|
+
_defineProperty(_assertThisInitialized(_this), "onDoubleClick", function (record) {
|
|
190
193
|
clearTimeout(_this.timer);
|
|
191
194
|
var _ref7 = _this.props.callback || {},
|
|
192
195
|
onDoubleClick = _ref7.onDoubleClick;
|
|
193
196
|
onDoubleClick && onDoubleClick(record.key);
|
|
194
197
|
});
|
|
195
|
-
_defineProperty(_this, "onLink", function (key, index, item, e) {
|
|
198
|
+
_defineProperty(_assertThisInitialized(_this), "onLink", function (key, index, item, e) {
|
|
196
199
|
var _ref8 = _this.props.callback || {},
|
|
197
200
|
onLink = _ref8.onLink;
|
|
198
201
|
onLink && onLink(key, index, item);
|
|
199
202
|
e.stopPropagation();
|
|
200
203
|
});
|
|
201
|
-
_defineProperty(_this, "onLinkDouble", function (e) {
|
|
204
|
+
_defineProperty(_assertThisInitialized(_this), "onLinkDouble", function (e) {
|
|
202
205
|
e.stopPropagation();
|
|
203
206
|
});
|
|
204
|
-
_defineProperty(_this, "getSelectedRowKeys", function (items) {
|
|
207
|
+
_defineProperty(_assertThisInitialized(_this), "getSelectedRowKeys", function (items) {
|
|
205
208
|
return _reduceInstanceProperty(items).call(items, function (result, item, index) {
|
|
206
209
|
item.checked && result.push(index);
|
|
207
210
|
return result;
|
|
208
211
|
}, []);
|
|
209
212
|
});
|
|
210
|
-
_defineProperty(_this, "getIndexInfo", function () {
|
|
213
|
+
_defineProperty(_assertThisInitialized(_this), "getIndexInfo", function () {
|
|
211
214
|
var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
212
215
|
var _this$props = _this.props,
|
|
213
216
|
_this$props$index = _this$props.index,
|
|
@@ -222,7 +225,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
222
225
|
}
|
|
223
226
|
}] : [];
|
|
224
227
|
});
|
|
225
|
-
_defineProperty(_this, "setSortInfo", function (col, sortInfo) {
|
|
228
|
+
_defineProperty(_assertThisInitialized(_this), "setSortInfo", function (col, sortInfo) {
|
|
226
229
|
if (col.sorter === 'string') {
|
|
227
230
|
col.sortOrder = sortInfo.columnKey === col.key && sortInfo.order;
|
|
228
231
|
col.sorter = function (row1, row2) {
|
|
@@ -245,7 +248,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
245
248
|
delete col.sorter;
|
|
246
249
|
}
|
|
247
250
|
});
|
|
248
|
-
_defineProperty(_this, "setFilterInfo", function (col, filterInfo, visibleKey) {
|
|
251
|
+
_defineProperty(_assertThisInitialized(_this), "setFilterInfo", function (col, filterInfo, visibleKey) {
|
|
249
252
|
if (_filterInstanceProperty(col)) {
|
|
250
253
|
var _col$isDateFilterBySt = col.isDateFilterByStartAndEnd,
|
|
251
254
|
isDateFilterByStartAndEnd = _col$isDateFilterBySt === void 0 ? false : _col$isDateFilterBySt;
|
|
@@ -297,7 +300,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
297
300
|
}
|
|
298
301
|
delete col.filter;
|
|
299
302
|
});
|
|
300
|
-
_defineProperty(_this, "linkList", function (key, index, item) {
|
|
303
|
+
_defineProperty(_assertThisInitialized(_this), "linkList", function (key, index, item) {
|
|
301
304
|
var linkTitleKey = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'fileName';
|
|
302
305
|
var list = item[key] || [];
|
|
303
306
|
return /*#__PURE__*/React.createElement("div", null, _mapInstanceProperty(list).call(list, function (item2, index2) {
|
|
@@ -311,7 +314,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
311
314
|
}, _concatInstanceProperty(_context3 = "".concat(item2[linkTitleKey])).call(_context3, split));
|
|
312
315
|
}));
|
|
313
316
|
});
|
|
314
|
-
_defineProperty(_this, "waring", function (key, index, item, warningKey) {
|
|
317
|
+
_defineProperty(_assertThisInitialized(_this), "waring", function (key, index, item, warningKey) {
|
|
315
318
|
var text = item[key] ? item[key] : '';
|
|
316
319
|
var color = item[warningKey] == 1 ? 'red' : 'rgba(0, 0, 0, 0.65)';
|
|
317
320
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", {
|
|
@@ -320,7 +323,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
320
323
|
}
|
|
321
324
|
}, text.title ? text.title : text));
|
|
322
325
|
});
|
|
323
|
-
_defineProperty(_this, "defaultList", function (key, index, item, text, link) {
|
|
326
|
+
_defineProperty(_assertThisInitialized(_this), "defaultList", function (key, index, item, text, link) {
|
|
324
327
|
var _context4;
|
|
325
328
|
var onClick = _bindInstanceProperty(_context4 = _this.onLink).call(_context4, null, key, index, item);
|
|
326
329
|
if (link && typeof link === 'string') {
|
|
@@ -331,7 +334,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
331
334
|
}
|
|
332
335
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("p", null, text));
|
|
333
336
|
});
|
|
334
|
-
_defineProperty(_this, "getColumns", function (cols, items) {
|
|
337
|
+
_defineProperty(_assertThisInitialized(_this), "getColumns", function (cols, items) {
|
|
335
338
|
var _context5, _context6;
|
|
336
339
|
var _this$props2 = _this.props,
|
|
337
340
|
sortInfo = _this$props2.sortInfo,
|
|
@@ -339,8 +342,8 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
339
342
|
var filterVisibleKey = _this.state.filterVisibleKey;
|
|
340
343
|
return _mapInstanceProperty(_context5 = _concatInstanceProperty(_context6 = _this.getIndexInfo(items)).call(_context6, _filterInstanceProperty(cols).call(cols, function (col) {
|
|
341
344
|
return !col.hide;
|
|
342
|
-
}))).call(_context5, function (
|
|
343
|
-
var col = _extends({}, (_objectDestructuringEmpty(
|
|
345
|
+
}))).call(_context5, function (_ref10) {
|
|
346
|
+
var col = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
|
|
344
347
|
col.dataIndex = col.key;
|
|
345
348
|
col.className = col.key === 'index' ? 'ant-table-selection-column' : col.align ? s[col.align] : '';
|
|
346
349
|
col.noWrap && (col.className = variables('SuperTable3').noWrap);
|
|
@@ -370,7 +373,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
370
373
|
return col;
|
|
371
374
|
});
|
|
372
375
|
});
|
|
373
|
-
_defineProperty(_this, "getText", function (value, options) {
|
|
376
|
+
_defineProperty(_assertThisInitialized(_this), "getText", function (value, options) {
|
|
374
377
|
if (_Array$isArray(value)) {
|
|
375
378
|
return _mapInstanceProperty(value).call(value, function (v) {
|
|
376
379
|
return getTitle(v, options);
|
|
@@ -379,7 +382,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
379
382
|
return getTitle(value, options);
|
|
380
383
|
}
|
|
381
384
|
});
|
|
382
|
-
_defineProperty(_this, "link", function (key, index, item, text) {
|
|
385
|
+
_defineProperty(_assertThisInitialized(_this), "link", function (key, index, item, text) {
|
|
383
386
|
var _context7;
|
|
384
387
|
var onClick = _bindInstanceProperty(_context7 = _this.onLink).call(_context7, null, key, index, item);
|
|
385
388
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -387,16 +390,16 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
387
390
|
onDoubleClick: _this.onLinkDouble
|
|
388
391
|
}, text);
|
|
389
392
|
});
|
|
390
|
-
_defineProperty(_this, "tooltip", function (key, index, item,
|
|
391
|
-
var tipLen =
|
|
392
|
-
options =
|
|
393
|
+
_defineProperty(_assertThisInitialized(_this), "tooltip", function (key, index, item, _ref11) {
|
|
394
|
+
var tipLen = _ref11.tooltip,
|
|
395
|
+
options = _ref11.options;
|
|
393
396
|
var text = _this.getText(item[key], options);
|
|
394
397
|
var needTip = tipLen > 1 && text && typeof text === 'string' && text.length > tipLen;
|
|
395
398
|
return needTip ? /*#__PURE__*/React.createElement(_Tooltip, {
|
|
396
399
|
title: text
|
|
397
400
|
}, /*#__PURE__*/React.createElement("span", null, _sliceInstanceProperty(text).call(text, 0, tipLen) + '...')) : /*#__PURE__*/React.createElement("span", null, _Array$isArray(text) ? text.join(',') : text);
|
|
398
401
|
});
|
|
399
|
-
_defineProperty(_this, "getImgSrc", function (value, options) {
|
|
402
|
+
_defineProperty(_assertThisInitialized(_this), "getImgSrc", function (value, options) {
|
|
400
403
|
var index = _findIndexInstanceProperty(options).call(options, function (obj) {
|
|
401
404
|
return obj.value == value;
|
|
402
405
|
});
|
|
@@ -409,7 +412,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
409
412
|
* @param options{array}:字段options
|
|
410
413
|
* @param dataSource{string,array}:数据源,如果列数据有多层则用此决定
|
|
411
414
|
*/
|
|
412
|
-
_defineProperty(_this, "getSourceText", function (item, key, options, dataSource) {
|
|
415
|
+
_defineProperty(_assertThisInitialized(_this), "getSourceText", function (item, key, options, dataSource) {
|
|
413
416
|
var value = {};
|
|
414
417
|
if (typeof dataSource === 'string') {
|
|
415
418
|
value = item[dataSource] || {};
|
|
@@ -429,14 +432,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
429
432
|
}
|
|
430
433
|
return _this.getText(value, options);
|
|
431
434
|
});
|
|
432
|
-
_defineProperty(_this, "getDataSource", function (items, cols) {
|
|
435
|
+
_defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
|
|
433
436
|
var getItemObj = function getItemObj(item, index) {
|
|
434
|
-
return _reduceInstanceProperty(cols).call(cols, function (result,
|
|
435
|
-
var key =
|
|
436
|
-
options =
|
|
437
|
-
link =
|
|
438
|
-
icon =
|
|
439
|
-
dataSource =
|
|
437
|
+
return _reduceInstanceProperty(cols).call(cols, function (result, _ref12) {
|
|
438
|
+
var key = _ref12.key,
|
|
439
|
+
options = _ref12.options,
|
|
440
|
+
link = _ref12.link,
|
|
441
|
+
icon = _ref12.icon,
|
|
442
|
+
dataSource = _ref12.dataSource;
|
|
440
443
|
if (link) {
|
|
441
444
|
if (typeof link === 'boolean') {
|
|
442
445
|
result[key] = _this.link(key, index, item, _this.getText(item[key], options));
|
|
@@ -465,14 +468,14 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
465
468
|
var _context9;
|
|
466
469
|
return _objectSpread(_objectSpread({}, getItemObj(item, index)), {}, {
|
|
467
470
|
children: item.children ? _mapInstanceProperty(_context9 = item.children).call(_context9, function (item2, index2) {
|
|
468
|
-
var
|
|
469
|
-
return getItemObj(item2, _concatInstanceProperty(
|
|
471
|
+
var _context10;
|
|
472
|
+
return getItemObj(item2, _concatInstanceProperty(_context10 = "".concat(index, "-")).call(_context10, index2));
|
|
470
473
|
}) : null
|
|
471
474
|
});
|
|
472
475
|
});
|
|
473
476
|
return data;
|
|
474
477
|
});
|
|
475
|
-
_defineProperty(_this, "getPropsByCheckbox", function () {
|
|
478
|
+
_defineProperty(_assertThisInitialized(_this), "getPropsByCheckbox", function () {
|
|
476
479
|
var _this$props3 = _this.props,
|
|
477
480
|
_this$props3$checkbox = _this$props3.checkbox,
|
|
478
481
|
checkbox = _this$props3$checkbox === void 0 ? true : _this$props3$checkbox,
|
|
@@ -498,7 +501,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
498
501
|
};
|
|
499
502
|
}
|
|
500
503
|
});
|
|
501
|
-
_defineProperty(_this, "getRowProps", function (onRowClick) {
|
|
504
|
+
_defineProperty(_assertThisInitialized(_this), "getRowProps", function (onRowClick) {
|
|
502
505
|
return function (record) {
|
|
503
506
|
return {
|
|
504
507
|
onClick: function onClick() {
|
|
@@ -510,7 +513,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
510
513
|
};
|
|
511
514
|
};
|
|
512
515
|
});
|
|
513
|
-
_defineProperty(_this, "getItems", function () {
|
|
516
|
+
_defineProperty(_assertThisInitialized(_this), "getItems", function () {
|
|
514
517
|
var _this$props4 = _this.props,
|
|
515
518
|
items = _this$props4.items,
|
|
516
519
|
childrenKey = _this$props4.childrenKey;
|
|
@@ -524,7 +527,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
524
527
|
}
|
|
525
528
|
return resItems;
|
|
526
529
|
});
|
|
527
|
-
_defineProperty(_this, "toTotalFooter", function () {
|
|
530
|
+
_defineProperty(_assertThisInitialized(_this), "toTotalFooter", function () {
|
|
528
531
|
var _this$props5 = _this.props,
|
|
529
532
|
cols = _this$props5.cols,
|
|
530
533
|
items = _this$props5.items,
|
|
@@ -537,11 +540,11 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
537
540
|
return _includesInstanceProperty(checkedRows).call(checkedRows, index);
|
|
538
541
|
});
|
|
539
542
|
var countItems = checkedItems.length ? checkedItems : items;
|
|
540
|
-
var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (
|
|
541
|
-
var title =
|
|
542
|
-
key =
|
|
543
|
-
|
|
544
|
-
props =
|
|
543
|
+
var totalItems = _mapInstanceProperty(totalCols).call(totalCols, function (_ref13) {
|
|
544
|
+
var title = _ref13.title,
|
|
545
|
+
key = _ref13.key,
|
|
546
|
+
_ref13$props = _ref13.props,
|
|
547
|
+
props = _ref13$props === void 0 ? {} : _ref13$props;
|
|
545
548
|
var value = _reduceInstanceProperty(countItems).call(countItems, function (result, item) {
|
|
546
549
|
return _parseFloat((result + Number(item[key] || 0)).toFixed(props.precision || 6));
|
|
547
550
|
}, 0);
|
|
@@ -559,9 +562,9 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
559
562
|
style: {
|
|
560
563
|
marginRight: "15px"
|
|
561
564
|
}
|
|
562
|
-
}, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (
|
|
563
|
-
var title =
|
|
564
|
-
value =
|
|
565
|
+
}, checkedItems.length ? '【当页勾选汇总】' : '【当页汇总】'), _mapInstanceProperty(totalItems).call(totalItems, function (_ref14, index) {
|
|
566
|
+
var title = _ref14.title,
|
|
567
|
+
value = _ref14.value;
|
|
565
568
|
return /*#__PURE__*/React.createElement("span", {
|
|
566
569
|
key: index,
|
|
567
570
|
style: {
|
|
@@ -577,7 +580,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
577
580
|
return null;
|
|
578
581
|
}
|
|
579
582
|
});
|
|
580
|
-
_defineProperty(_this, "getProps", function () {
|
|
583
|
+
_defineProperty(_assertThisInitialized(_this), "getProps", function () {
|
|
581
584
|
var _this$props6 = _this.props,
|
|
582
585
|
cols = _this$props6.cols,
|
|
583
586
|
_this$props6$isPaging = _this$props6.isPaging,
|
|
@@ -604,10 +607,10 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
604
607
|
}, extraProps);
|
|
605
608
|
return renderProps;
|
|
606
609
|
});
|
|
607
|
-
_defineProperty(_this, "setScroll", function () {
|
|
610
|
+
_defineProperty(_assertThisInitialized(_this), "setScroll", function () {
|
|
608
611
|
var maxHeight = _this.props.maxHeight;
|
|
609
612
|
if (maxHeight && _this.getItems().length) {
|
|
610
|
-
var root = ReactDOM.findDOMNode(_this);
|
|
613
|
+
var root = ReactDOM.findDOMNode(_assertThisInitialized(_this));
|
|
611
614
|
var container = root.getElementsByClassName('ant-table-body')[0];
|
|
612
615
|
var header = root.getElementsByClassName('ant-table-thead')[0];
|
|
613
616
|
fixed(container, header, maxHeight);
|
|
@@ -615,8 +618,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
615
618
|
});
|
|
616
619
|
return _this;
|
|
617
620
|
}
|
|
618
|
-
|
|
619
|
-
return _createClass(SuperTable, [{
|
|
621
|
+
_createClass(SuperTable, [{
|
|
620
622
|
key: "shouldComponentUpdate",
|
|
621
623
|
value: function shouldComponentUpdate(props, state) {
|
|
622
624
|
var _this2 = this;
|
|
@@ -643,6 +645,7 @@ var SuperTable = /*#__PURE__*/function (_React$Component) {
|
|
|
643
645
|
}));
|
|
644
646
|
}
|
|
645
647
|
}]);
|
|
648
|
+
return SuperTable;
|
|
646
649
|
}(React.Component);
|
|
647
650
|
_defineProperty(SuperTable, "propTypes", {
|
|
648
651
|
cols: PropTypes.arrayOf(PropTypes.shape(ColType)).isRequired,
|