cloud-b2b 1.1.70 → 1.1.71
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 +8 -11
- 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 +101 -103
- 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/SuperTableCell.js +27 -30
- package/es/SuperTable3/FilterDropDown.js +11 -14
- package/es/SuperTable3/SuperTable.js +58 -61
- package/es/SuperToolbar/SuperToolbar.js +11 -14
- package/es/SuperUpload/SuperUpload.js +74 -74
- 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 +8 -11
- 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 +102 -105
- 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/SuperTableCell.js +27 -30
- package/lib/SuperTable3/FilterDropDown.js +11 -14
- package/lib/SuperTable3/SuperTable.js +58 -61
- package/lib/SuperToolbar/SuperToolbar.js +11 -14
- package/lib/SuperUpload/SuperUpload.js +75 -76
- 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
|
@@ -32,10 +32,9 @@ var _checkbox = _interopRequireDefault(require("antd/lib/checkbox"));
|
|
|
32
32
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/typeof"));
|
|
33
33
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
34
34
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
35
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
36
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
37
35
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
38
36
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
37
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
39
38
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
40
39
|
var _form = _interopRequireDefault(require("antd/lib/form"));
|
|
41
40
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -44,12 +43,11 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
44
43
|
var _helper = _interopRequireDefault(require("../helper"));
|
|
45
44
|
var _Control = _interopRequireWildcard(require("../Control"));
|
|
46
45
|
var _variables = _interopRequireDefault(require("../variables"));
|
|
47
|
-
function
|
|
48
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
46
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
49
47
|
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; }
|
|
50
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
51
|
-
function
|
|
52
|
-
function _isNativeReflectConstruct() {
|
|
48
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context24, _context25; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context24 = ownKeys(Object(t), !0)).call(_context24, function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context25 = ownKeys(Object(t))).call(_context25, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
49
|
+
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)); }
|
|
50
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
53
51
|
var FormItem = _form["default"].Item;
|
|
54
52
|
var defaultSize = 'large';
|
|
55
53
|
var defaultColNum = 4;
|
|
@@ -78,13 +76,11 @@ var ControlType = {
|
|
|
78
76
|
props: _propTypes["default"].object
|
|
79
77
|
};
|
|
80
78
|
var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
81
|
-
(0, _inherits2["default"])(Controlled, _React$Component);
|
|
82
|
-
var _super = _createSuper(Controlled);
|
|
83
79
|
function Controlled(props) {
|
|
84
80
|
var _this;
|
|
85
81
|
(0, _classCallCheck2["default"])(this, Controlled);
|
|
86
|
-
_this =
|
|
87
|
-
(0, _defineProperty2["default"])(
|
|
82
|
+
_this = _callSuper(this, Controlled, [props]);
|
|
83
|
+
(0, _defineProperty2["default"])(_this, "onChange", function (value) {
|
|
88
84
|
var onChange = _this.props.onChange;
|
|
89
85
|
_this.setState({
|
|
90
86
|
value: value
|
|
@@ -96,7 +92,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
96
92
|
};
|
|
97
93
|
return _this;
|
|
98
94
|
}
|
|
99
|
-
(0,
|
|
95
|
+
(0, _inherits2["default"])(Controlled, _React$Component);
|
|
96
|
+
return (0, _createClass2["default"])(Controlled, [{
|
|
100
97
|
key: "componentWillReceiveProps",
|
|
101
98
|
value: function componentWillReceiveProps(nextProps) {
|
|
102
99
|
if (this.props.value !== nextProps.value) {
|
|
@@ -116,7 +113,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
116
113
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
117
114
|
}
|
|
118
115
|
}]);
|
|
119
|
-
return Controlled;
|
|
120
116
|
}(_react["default"].Component);
|
|
121
117
|
/**
|
|
122
118
|
* colNum:[可选],表单的列数,默认为4
|
|
@@ -132,8 +128,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
|
|
|
132
128
|
* onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
|
|
133
129
|
*/
|
|
134
130
|
var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
135
|
-
(0, _inherits2["default"])(SuperForm2, _React$Component2);
|
|
136
|
-
var _super2 = _createSuper(SuperForm2);
|
|
137
131
|
function SuperForm2() {
|
|
138
132
|
var _context;
|
|
139
133
|
var _this2;
|
|
@@ -141,35 +135,35 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
141
135
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
142
136
|
args[_key] = arguments[_key];
|
|
143
137
|
}
|
|
144
|
-
_this2 =
|
|
145
|
-
(0, _defineProperty2["default"])(
|
|
138
|
+
_this2 = _callSuper(this, SuperForm2, (0, _concat["default"])(_context = []).call(_context, args));
|
|
139
|
+
(0, _defineProperty2["default"])(_this2, "onAdd", function (key, title) {
|
|
146
140
|
var onAdd = _this2.props.onAdd;
|
|
147
141
|
onAdd && onAdd(key, title);
|
|
148
142
|
});
|
|
149
|
-
(0, _defineProperty2["default"])(
|
|
143
|
+
(0, _defineProperty2["default"])(_this2, "onFileChange", function (_ref, file) {
|
|
150
144
|
var key = _ref.key;
|
|
151
145
|
var onFileChange = _this2.props.onFileChange;
|
|
152
146
|
onFileChange && onFileChange(key, file);
|
|
153
147
|
});
|
|
154
|
-
(0, _defineProperty2["default"])(
|
|
148
|
+
(0, _defineProperty2["default"])(_this2, "onChange", function (key, value) {
|
|
155
149
|
var onChange = _this2.props.onChange;
|
|
156
150
|
if (onChange) {
|
|
157
151
|
_this2.onExitValid(key);
|
|
158
152
|
onChange(key, value);
|
|
159
153
|
}
|
|
160
154
|
});
|
|
161
|
-
(0, _defineProperty2["default"])(
|
|
155
|
+
(0, _defineProperty2["default"])(_this2, "onGetCode", function (key, value) {
|
|
162
156
|
var onGetCode = _this2.props.onGetCode;
|
|
163
157
|
onGetCode && onGetCode();
|
|
164
158
|
});
|
|
165
|
-
(0, _defineProperty2["default"])(
|
|
159
|
+
(0, _defineProperty2["default"])(_this2, "onBlur", function (key, value) {
|
|
166
160
|
var onChange = _this2.props.onChange;
|
|
167
161
|
if (onChange) {
|
|
168
162
|
_this2.onExitValid(key);
|
|
169
163
|
onChange(key, value);
|
|
170
164
|
}
|
|
171
165
|
});
|
|
172
|
-
(0, _defineProperty2["default"])(
|
|
166
|
+
(0, _defineProperty2["default"])(_this2, "onExitValid", function (key, value) {
|
|
173
167
|
if (key === _this2.validKey) {
|
|
174
168
|
_this2.validKey = '';
|
|
175
169
|
_this2.props.onExitValid();
|
|
@@ -177,7 +171,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
177
171
|
_this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
|
|
178
172
|
});
|
|
179
173
|
// 动态生成getValidState方法
|
|
180
|
-
(0, _defineProperty2["default"])(
|
|
174
|
+
(0, _defineProperty2["default"])(_this2, "initValidState", function () {
|
|
181
175
|
var _this2$props = _this2.props,
|
|
182
176
|
value = _this2$props.value,
|
|
183
177
|
valid = _this2$props.valid;
|
|
@@ -198,7 +192,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
198
192
|
};
|
|
199
193
|
_this2.getValidState = valid ? _valid : invalid;
|
|
200
194
|
});
|
|
201
|
-
(0, _defineProperty2["default"])(
|
|
195
|
+
(0, _defineProperty2["default"])(_this2, "validDate", function (_ref3) {
|
|
202
196
|
var key = _ref3.key,
|
|
203
197
|
type = _ref3.type;
|
|
204
198
|
return function (date) {
|
|
@@ -217,25 +211,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
217
211
|
}
|
|
218
212
|
};
|
|
219
213
|
});
|
|
220
|
-
(0, _defineProperty2["default"])(
|
|
214
|
+
(0, _defineProperty2["default"])(_this2, "getPopupContainer", function () {
|
|
221
215
|
var container = _this2.props.container;
|
|
222
216
|
if (typeof container === 'undefined') {
|
|
223
|
-
return _reactDom["default"].findDOMNode(
|
|
217
|
+
return _reactDom["default"].findDOMNode(_this2);
|
|
224
218
|
} else if (typeof container === 'boolean') {
|
|
225
219
|
return document.body;
|
|
226
220
|
} else {
|
|
227
221
|
return _reactDom["default"].findDOMNode(container);
|
|
228
222
|
}
|
|
229
223
|
});
|
|
230
|
-
(0, _defineProperty2["default"])(
|
|
224
|
+
(0, _defineProperty2["default"])(_this2, "getMaxWidth", function () {
|
|
231
225
|
var _this2$props$colNum = _this2.props.colNum,
|
|
232
226
|
colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
|
|
233
227
|
return colNum * 1200;
|
|
234
228
|
});
|
|
235
|
-
(0, _defineProperty2["default"])(
|
|
229
|
+
(0, _defineProperty2["default"])(_this2, "getContainer", function () {
|
|
236
230
|
return _this2.props.getContainer;
|
|
237
231
|
});
|
|
238
|
-
(0, _defineProperty2["default"])(
|
|
232
|
+
(0, _defineProperty2["default"])(_this2, "getControls", function () {
|
|
239
233
|
var _this2$props2 = _this2.props,
|
|
240
234
|
hideControls = _this2$props2.hideControls,
|
|
241
235
|
controls = _this2$props2.controls;
|
|
@@ -249,7 +243,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
249
243
|
});
|
|
250
244
|
}
|
|
251
245
|
});
|
|
252
|
-
(0, _defineProperty2["default"])(
|
|
246
|
+
(0, _defineProperty2["default"])(_this2, "getType", function (_ref4) {
|
|
253
247
|
var _context2;
|
|
254
248
|
var key = _ref4.key,
|
|
255
249
|
type = _ref4.type;
|
|
@@ -268,7 +262,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
268
262
|
return type;
|
|
269
263
|
}
|
|
270
264
|
});
|
|
271
|
-
(0, _defineProperty2["default"])(
|
|
265
|
+
(0, _defineProperty2["default"])(_this2, "specialProps", function (type, _ref5) {
|
|
272
266
|
var key = _ref5.key,
|
|
273
267
|
_ref5$props = _ref5.props,
|
|
274
268
|
props = _ref5$props === void 0 ? {} : _ref5$props,
|
|
@@ -279,70 +273,70 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
279
273
|
return {
|
|
280
274
|
type: 'textArea',
|
|
281
275
|
readonly: true,
|
|
282
|
-
onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3,
|
|
276
|
+
onBlur: (0, _bind["default"])(_context3 = _this2.onExitValid).call(_context3, _this2, key)
|
|
283
277
|
};
|
|
284
278
|
} else if (originType === 'uploadImg') {
|
|
285
279
|
var _context4;
|
|
286
280
|
var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
287
281
|
return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
|
|
288
282
|
readonly: true,
|
|
289
|
-
onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4,
|
|
283
|
+
onBlur: (0, _bind["default"])(_context4 = _this2.onExitValid).call(_context4, _this2, key)
|
|
290
284
|
});
|
|
291
285
|
} else {
|
|
292
286
|
var _context5;
|
|
293
287
|
return {
|
|
294
|
-
onBlur: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5,
|
|
288
|
+
onBlur: (0, _bind["default"])(_context5 = _this2.onExitValid).call(_context5, _this2, key)
|
|
295
289
|
};
|
|
296
290
|
}
|
|
297
291
|
} else if (type === 'text' || type === 'textArea') {
|
|
298
292
|
var _context6, _context7;
|
|
299
293
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
300
|
-
onChange: (0, _bind["default"])(_context6 = _this2.onExitValid).call(_context6,
|
|
301
|
-
onBlur: (0, _bind["default"])(_context7 = _this2.onChange).call(_context7,
|
|
294
|
+
onChange: (0, _bind["default"])(_context6 = _this2.onExitValid).call(_context6, _this2, key),
|
|
295
|
+
onBlur: (0, _bind["default"])(_context7 = _this2.onChange).call(_context7, _this2, key)
|
|
302
296
|
});
|
|
303
297
|
} else if (type === 'date') {
|
|
304
298
|
var _context8, _context9;
|
|
305
299
|
var propsObj = _objectSpread(_objectSpread({}, props), {}, {
|
|
306
|
-
onChange: (0, _bind["default"])(_context8 = _this2.onBlur).call(_context8,
|
|
307
|
-
onBlur: (0, _bind["default"])(_context9 = _this2.onExitValid).call(_context9,
|
|
300
|
+
onChange: (0, _bind["default"])(_context8 = _this2.onBlur).call(_context8, _this2, key),
|
|
301
|
+
onBlur: (0, _bind["default"])(_context9 = _this2.onExitValid).call(_context9, _this2, key)
|
|
308
302
|
});
|
|
309
303
|
if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
|
|
310
|
-
var
|
|
311
|
-
propsObj.onOpenChange = (0, _bind["default"])(
|
|
304
|
+
var _context0;
|
|
305
|
+
propsObj.onOpenChange = (0, _bind["default"])(_context0 = _this2.props.onOpenChange).call(_context0, _this2, key);
|
|
312
306
|
}
|
|
313
307
|
return propsObj;
|
|
314
308
|
} else if (type === 'captcha') {
|
|
315
|
-
var
|
|
309
|
+
var _context1, _context10, _context11;
|
|
316
310
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
317
|
-
onChange: (0, _bind["default"])(
|
|
318
|
-
onBlur: (0, _bind["default"])(
|
|
319
|
-
onGetCode: (0, _bind["default"])(
|
|
311
|
+
onChange: (0, _bind["default"])(_context1 = _this2.onBlur).call(_context1, _this2, key),
|
|
312
|
+
onBlur: (0, _bind["default"])(_context10 = _this2.onExitValid).call(_context10, _this2, key),
|
|
313
|
+
onGetCode: (0, _bind["default"])(_context11 = _this2.onGetCode).call(_context11, _this2, key)
|
|
320
314
|
});
|
|
321
315
|
} else if (type === 'area') {
|
|
322
|
-
var
|
|
316
|
+
var _context12, _context13;
|
|
323
317
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
324
|
-
onChange: (0, _bind["default"])(
|
|
325
|
-
onBlur: (0, _bind["default"])(
|
|
318
|
+
onChange: (0, _bind["default"])(_context12 = _this2.onBlur).call(_context12, _this2, key),
|
|
319
|
+
onBlur: (0, _bind["default"])(_context13 = _this2.onExitValid).call(_context13, _this2, key),
|
|
326
320
|
onAreaSearch: _this2.props.onAreaSearch
|
|
327
321
|
});
|
|
328
322
|
} else if (type === 'uploadImg') {
|
|
329
|
-
var
|
|
323
|
+
var _context14, _context15;
|
|
330
324
|
var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
|
|
331
325
|
return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
|
|
332
|
-
onChange: (0, _bind["default"])(
|
|
333
|
-
onBlur: (0, _bind["default"])(
|
|
326
|
+
onChange: (0, _bind["default"])(_context14 = _this2.onBlur).call(_context14, _this2, key),
|
|
327
|
+
onBlur: (0, _bind["default"])(_context15 = _this2.onExitValid).call(_context15, _this2, key)
|
|
334
328
|
});
|
|
335
329
|
} else if (type === 'double') {
|
|
336
330
|
return props;
|
|
337
331
|
} else {
|
|
338
|
-
var
|
|
332
|
+
var _context16, _context17;
|
|
339
333
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
340
|
-
onChange: (0, _bind["default"])(
|
|
341
|
-
onBlur: (0, _bind["default"])(
|
|
334
|
+
onChange: (0, _bind["default"])(_context16 = _this2.onBlur).call(_context16, _this2, key),
|
|
335
|
+
onBlur: (0, _bind["default"])(_context17 = _this2.onExitValid).call(_context17, _this2, key)
|
|
342
336
|
});
|
|
343
337
|
}
|
|
344
338
|
});
|
|
345
|
-
(0, _defineProperty2["default"])(
|
|
339
|
+
(0, _defineProperty2["default"])(_this2, "getControlProps", function (control, status) {
|
|
346
340
|
var _this2$props3 = _this2.props,
|
|
347
341
|
_this2$props3$value = _this2$props3.value,
|
|
348
342
|
value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
|
|
@@ -357,25 +351,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
357
351
|
value: (0, _Control.makeString)(value[control.key])
|
|
358
352
|
});
|
|
359
353
|
});
|
|
360
|
-
(0, _defineProperty2["default"])(
|
|
354
|
+
(0, _defineProperty2["default"])(_this2, "getOptions", function (key, options) {
|
|
361
355
|
var higher = _this2.props.options || {};
|
|
362
356
|
return higher[key] || options;
|
|
363
357
|
});
|
|
364
|
-
(0, _defineProperty2["default"])(
|
|
365
|
-
(0, _defineProperty2["default"])(
|
|
358
|
+
(0, _defineProperty2["default"])(_this2, "toEmpty", function (props) {});
|
|
359
|
+
(0, _defineProperty2["default"])(_this2, "toText", function (props) {
|
|
366
360
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
367
361
|
});
|
|
368
|
-
(0, _defineProperty2["default"])(
|
|
362
|
+
(0, _defineProperty2["default"])(_this2, "toPassword", function (props) {
|
|
369
363
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
370
364
|
});
|
|
371
|
-
(0, _defineProperty2["default"])(
|
|
365
|
+
(0, _defineProperty2["default"])(_this2, "toEditor", function (props, control) {
|
|
372
366
|
props.inputKey = control.key;
|
|
373
367
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
374
368
|
});
|
|
375
|
-
(0, _defineProperty2["default"])(
|
|
369
|
+
(0, _defineProperty2["default"])(_this2, "toSelectWriting", function (props, control) {
|
|
376
370
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
377
371
|
});
|
|
378
|
-
(0, _defineProperty2["default"])(
|
|
372
|
+
(0, _defineProperty2["default"])(_this2, "toTextArea", function (props, control) {
|
|
379
373
|
if (control.allFullFather) {
|
|
380
374
|
props.rows = control.rows;
|
|
381
375
|
props.maxLength = control.maxLength;
|
|
@@ -390,30 +384,31 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
390
384
|
}
|
|
391
385
|
return /*#__PURE__*/_react["default"].createElement(Controlled, props);
|
|
392
386
|
});
|
|
393
|
-
(0, _defineProperty2["default"])(
|
|
387
|
+
(0, _defineProperty2["default"])(_this2, "toNumber", function (props) {
|
|
394
388
|
props.defaultValue = props.value;
|
|
395
389
|
delete props.value;
|
|
396
390
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
397
391
|
});
|
|
398
|
-
(0, _defineProperty2["default"])(
|
|
399
|
-
var
|
|
392
|
+
(0, _defineProperty2["default"])(_this2, "toDoubleInput", function (props, control, cc) {
|
|
393
|
+
var _context18, _context19;
|
|
400
394
|
props.defaultValue = props.value;
|
|
401
395
|
props.doubleKey = props.key;
|
|
402
396
|
props.doubleValue = _helper["default"].getObject(cc, props.key);
|
|
403
|
-
props.onChangeKey1 = (0, _bind["default"])(
|
|
404
|
-
props.onChangeKey2 = (0, _bind["default"])(
|
|
397
|
+
props.onChangeKey1 = (0, _bind["default"])(_context18 = _this2.onChange).call(_context18, _this2, props.key[0]);
|
|
398
|
+
props.onChangeKey2 = (0, _bind["default"])(_context19 = _this2.onChange).call(_context19, _this2, props.key[1]);
|
|
405
399
|
delete props.value;
|
|
406
400
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
407
401
|
});
|
|
408
|
-
(0, _defineProperty2["default"])(
|
|
402
|
+
(0, _defineProperty2["default"])(_this2, "toSelect", function (props, _ref6) {
|
|
409
403
|
var options = _ref6.options,
|
|
410
404
|
key = _ref6.key;
|
|
411
405
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
412
406
|
props.options = _this2.getOptions(key, options);
|
|
413
407
|
props.dropdownMatchSelectWidth = false;
|
|
408
|
+
props.placeholder = filter.placeholder || '';
|
|
414
409
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
415
410
|
});
|
|
416
|
-
(0, _defineProperty2["default"])(
|
|
411
|
+
(0, _defineProperty2["default"])(_this2, "toTreeSelect", function (props, filter) {
|
|
417
412
|
var container = _this2.getContainer();
|
|
418
413
|
container && (props.getPopupContainer = container);
|
|
419
414
|
props.options = _this2.getOptions(filter);
|
|
@@ -421,7 +416,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
421
416
|
props.placeholder = filter.placeholder || '';
|
|
422
417
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
423
418
|
});
|
|
424
|
-
(0, _defineProperty2["default"])(
|
|
419
|
+
(0, _defineProperty2["default"])(_this2, "createSearchEvent", function (control) {
|
|
425
420
|
if (_this2.props.onSearch) {
|
|
426
421
|
return function (value) {
|
|
427
422
|
return _this2.props.onSearch(control.key, value, control);
|
|
@@ -430,7 +425,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
430
425
|
return null;
|
|
431
426
|
}
|
|
432
427
|
});
|
|
433
|
-
(0, _defineProperty2["default"])(
|
|
428
|
+
(0, _defineProperty2["default"])(_this2, "createGetCodeEvent", function (control) {
|
|
434
429
|
if (_this2.props.onGetCode) {
|
|
435
430
|
return function (value) {
|
|
436
431
|
return _this2.props.onGetCode(control.key, value, control);
|
|
@@ -439,14 +434,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
439
434
|
return null;
|
|
440
435
|
}
|
|
441
436
|
});
|
|
442
|
-
(0, _defineProperty2["default"])(
|
|
437
|
+
(0, _defineProperty2["default"])(_this2, "toSearch", function (props, control) {
|
|
443
438
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
444
439
|
props.options = _this2.getOptions(control.key, control.options);
|
|
445
440
|
props.onSearch = _this2.createSearchEvent(control);
|
|
446
441
|
props.dropdownMatchSelectWidth = false;
|
|
442
|
+
props.placeholder = props.placeholder || '';
|
|
447
443
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
448
444
|
});
|
|
449
|
-
(0, _defineProperty2["default"])(
|
|
445
|
+
(0, _defineProperty2["default"])(_this2, "toDate", function (props, _ref7) {
|
|
450
446
|
var rule = _ref7.rule;
|
|
451
447
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
452
448
|
props.style = {
|
|
@@ -455,7 +451,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
455
451
|
rule && (props.disabledDate = _this2.validDate(rule));
|
|
456
452
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
457
453
|
});
|
|
458
|
-
(0, _defineProperty2["default"])(
|
|
454
|
+
(0, _defineProperty2["default"])(_this2, "toRangePicker", function (props, _ref8) {
|
|
459
455
|
var rule = _ref8.rule;
|
|
460
456
|
props.getCalendarContainer = _this2.getPopupContainer;
|
|
461
457
|
props.style = {
|
|
@@ -464,32 +460,33 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
464
460
|
// rule && (props.disabledDate = this.validDate(rule));
|
|
465
461
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
466
462
|
});
|
|
467
|
-
(0, _defineProperty2["default"])(
|
|
463
|
+
(0, _defineProperty2["default"])(_this2, "toRadioGroup", function (props, _ref9) {
|
|
468
464
|
var key = _ref9.key,
|
|
469
465
|
options = _ref9.options;
|
|
470
466
|
props.options = _this2.getOptions(key, options);
|
|
471
467
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
472
468
|
});
|
|
473
|
-
(0, _defineProperty2["default"])(
|
|
469
|
+
(0, _defineProperty2["default"])(_this2, "captcha", function (props, control) {
|
|
474
470
|
props.onGetCode = _this2.props.onGetCode;
|
|
475
471
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
476
472
|
});
|
|
477
|
-
(0, _defineProperty2["default"])(
|
|
478
|
-
var options =
|
|
479
|
-
key =
|
|
473
|
+
(0, _defineProperty2["default"])(_this2, "toReadonly", function (props, _ref0) {
|
|
474
|
+
var options = _ref0.options,
|
|
475
|
+
key = _ref0.key;
|
|
480
476
|
props.value = (0, _Control.getTitle)(props.value, _this2.getOptions(key, options));
|
|
481
477
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
482
478
|
});
|
|
483
|
-
(0, _defineProperty2["default"])(
|
|
479
|
+
(0, _defineProperty2["default"])(_this2, "selectSearch", function (props, control) {
|
|
484
480
|
props.getPopupContainer = _this2.getPopupContainer;
|
|
485
481
|
props.options = _this2.getOptions(control.key, control.options);
|
|
486
482
|
props.onSearch = _this2.createSearchEvent(control);
|
|
487
483
|
props.dropdownMatchSelectWidth = false;
|
|
484
|
+
props.placeholder = props.placeholder || '';
|
|
488
485
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
489
486
|
});
|
|
490
|
-
(0, _defineProperty2["default"])(
|
|
491
|
-
var key =
|
|
492
|
-
options =
|
|
487
|
+
(0, _defineProperty2["default"])(_this2, "area", function (props, _ref1) {
|
|
488
|
+
var key = _ref1.key,
|
|
489
|
+
options = _ref1.options;
|
|
493
490
|
var readonly = _this2.props.readonly;
|
|
494
491
|
props.parentKey = key;
|
|
495
492
|
props.options = _this2.getOptions(key, options);
|
|
@@ -499,17 +496,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
499
496
|
}) ? true : false;
|
|
500
497
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
501
498
|
});
|
|
502
|
-
(0, _defineProperty2["default"])(
|
|
503
|
-
var
|
|
499
|
+
(0, _defineProperty2["default"])(_this2, "uploadImg", function (props, control) {
|
|
500
|
+
var _context20;
|
|
504
501
|
var readonly = _this2.props.readonly;
|
|
505
502
|
props.required = control.required || false;
|
|
506
|
-
props.onFileChange = (0, _bind["default"])(
|
|
503
|
+
props.onFileChange = (0, _bind["default"])(_context20 = _this2.onFileChange).call(_context20, _this2, control);
|
|
507
504
|
props.readonly = readonly === true || (0, _isArray["default"])(readonly) && (0, _some["default"])(readonly).call(readonly, function (readonlyKey) {
|
|
508
505
|
return readonlyKey === control.key;
|
|
509
506
|
}) ? true : false;
|
|
510
507
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
511
508
|
});
|
|
512
|
-
(0, _defineProperty2["default"])(
|
|
509
|
+
(0, _defineProperty2["default"])(_this2, "toCascader", function (props, control) {
|
|
513
510
|
var container = _this2.getContainer();
|
|
514
511
|
container && (props.getPopupContainer = container);
|
|
515
512
|
props.options = control.options || [];
|
|
@@ -518,16 +515,16 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
518
515
|
props.loadData = _this2.createSearchEvent(control);
|
|
519
516
|
return /*#__PURE__*/_react["default"].createElement(_Control["default"], props);
|
|
520
517
|
});
|
|
521
|
-
(0, _defineProperty2["default"])(
|
|
522
|
-
var
|
|
518
|
+
(0, _defineProperty2["default"])(_this2, "toCheckbox", function (props, control) {
|
|
519
|
+
var _context21;
|
|
523
520
|
var options = control.options || [];
|
|
524
521
|
return /*#__PURE__*/_react["default"].createElement(_checkbox["default"].Group, {
|
|
525
522
|
options: options,
|
|
526
|
-
onChange: (0, _bind["default"])(
|
|
523
|
+
onChange: (0, _bind["default"])(_context21 = _this2.onBlur).call(_context21, _this2, control.key),
|
|
527
524
|
value: _this2.props.value[control.key]
|
|
528
525
|
});
|
|
529
526
|
});
|
|
530
|
-
(0, _defineProperty2["default"])(
|
|
527
|
+
(0, _defineProperty2["default"])(_this2, "toControl", function (props, control) {
|
|
531
528
|
switch (props.type) {
|
|
532
529
|
case 'readonly':
|
|
533
530
|
return _this2.toReadonly(props, control);
|
|
@@ -577,15 +574,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
577
574
|
return 'type error';
|
|
578
575
|
}
|
|
579
576
|
});
|
|
580
|
-
(0, _defineProperty2["default"])(
|
|
581
|
-
var title =
|
|
582
|
-
showAdd =
|
|
583
|
-
key =
|
|
584
|
-
showInfo =
|
|
585
|
-
showInfoTitle =
|
|
577
|
+
(0, _defineProperty2["default"])(_this2, "toLabel", function (_ref10, type) {
|
|
578
|
+
var title = _ref10.title,
|
|
579
|
+
showAdd = _ref10.showAdd,
|
|
580
|
+
key = _ref10.key,
|
|
581
|
+
showInfo = _ref10.showInfo,
|
|
582
|
+
showInfoTitle = _ref10.showInfoTitle;
|
|
586
583
|
if (showAdd && type !== 'readonly') {
|
|
587
|
-
var
|
|
588
|
-
var onClick = (0, _bind["default"])(
|
|
584
|
+
var _context22;
|
|
585
|
+
var onClick = (0, _bind["default"])(_context22 = _this2.onAdd).call(_context22, _this2, key, title);
|
|
589
586
|
return /*#__PURE__*/_react["default"].createElement("span", null, title, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
590
587
|
role: "add",
|
|
591
588
|
type: "plus-circle-o",
|
|
@@ -601,7 +598,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
601
598
|
return title;
|
|
602
599
|
}
|
|
603
600
|
});
|
|
604
|
-
(0, _defineProperty2["default"])(
|
|
601
|
+
(0, _defineProperty2["default"])(_this2, "toCol", function (span, control) {
|
|
605
602
|
var factor = control.span || 1;
|
|
606
603
|
var status = _this2.getValidState(control);
|
|
607
604
|
var controlProps = _this2.getControlProps(control, status);
|
|
@@ -618,7 +615,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
618
615
|
key: control.key
|
|
619
616
|
}, checkable && /*#__PURE__*/_react["default"].createElement(_checkbox["default"], {
|
|
620
617
|
className: (0, _variables["default"])('SuperForm2').checkbox,
|
|
621
|
-
onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem,
|
|
618
|
+
onChange: (0, _bind["default"])(onCheckItem).call(onCheckItem, _this2, control),
|
|
622
619
|
checked: control.checked
|
|
623
620
|
}), /*#__PURE__*/_react["default"].createElement(FormItem, (0, _extends2["default"])({}, itemProps, {
|
|
624
621
|
className: checkable ? (0, _variables["default"])('SuperForm2').formItemWithCheckbox : '',
|
|
@@ -646,8 +643,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
646
643
|
}
|
|
647
644
|
});
|
|
648
645
|
});
|
|
649
|
-
(0, _defineProperty2["default"])(
|
|
650
|
-
var
|
|
646
|
+
(0, _defineProperty2["default"])(_this2, "toCols", function () {
|
|
647
|
+
var _context23;
|
|
651
648
|
var _this2$props5 = _this2.props,
|
|
652
649
|
_this2$props5$colNum = _this2$props5.colNum,
|
|
653
650
|
colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
|
|
@@ -656,7 +653,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
656
653
|
colNum = 1;
|
|
657
654
|
}
|
|
658
655
|
var span = 24 / colNum;
|
|
659
|
-
return (0, _map["default"])(
|
|
656
|
+
return (0, _map["default"])(_context23 = _this2.getControls()).call(_context23, function (control) {
|
|
660
657
|
if (allFullFather) {
|
|
661
658
|
control.allFullFather = allFullFather;
|
|
662
659
|
}
|
|
@@ -665,7 +662,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
665
662
|
});
|
|
666
663
|
return _this2;
|
|
667
664
|
}
|
|
668
|
-
(0,
|
|
665
|
+
(0, _inherits2["default"])(SuperForm2, _React$Component2);
|
|
666
|
+
return (0, _createClass2["default"])(SuperForm2, [{
|
|
669
667
|
key: "render",
|
|
670
668
|
value: function render() {
|
|
671
669
|
this.initValidState();
|
|
@@ -683,7 +681,6 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
|
|
|
683
681
|
}, this.toCols())));
|
|
684
682
|
}
|
|
685
683
|
}]);
|
|
686
|
-
return SuperForm2;
|
|
687
684
|
}(_react["default"].Component);
|
|
688
685
|
(0, _defineProperty2["default"])(SuperForm2, "propTypes", {
|
|
689
686
|
controls: _propTypes["default"].arrayOf(_propTypes["default"].shape(ControlType)).isRequired,
|
|
@@ -12,15 +12,14 @@ var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-sta
|
|
|
12
12
|
var _pagination = _interopRequireDefault(require("antd/lib/pagination"));
|
|
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
|
-
function
|
|
23
|
-
function _isNativeReflectConstruct() {
|
|
21
|
+
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)); }
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
24
23
|
/**
|
|
25
24
|
* maxRecords: 最大记录数
|
|
26
25
|
* selRecords: [可选]已选记录条数
|
|
@@ -33,8 +32,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
33
32
|
* onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
|
|
34
33
|
*/
|
|
35
34
|
var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
36
|
-
(0, _inherits2["default"])(SuperPagination, _React$Component);
|
|
37
|
-
var _super = _createSuper(SuperPagination);
|
|
38
35
|
function SuperPagination() {
|
|
39
36
|
var _context;
|
|
40
37
|
var _this;
|
|
@@ -42,14 +39,14 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
42
39
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
43
40
|
args[_key] = arguments[_key];
|
|
44
41
|
}
|
|
45
|
-
_this =
|
|
46
|
-
(0, _defineProperty2["default"])(
|
|
42
|
+
_this = _callSuper(this, SuperPagination, (0, _concat["default"])(_context = []).call(_context, args));
|
|
43
|
+
(0, _defineProperty2["default"])(_this, "onChange", function (page) {
|
|
47
44
|
var _this$props$callback = _this.props.callback,
|
|
48
45
|
callback = _this$props$callback === void 0 ? {} : _this$props$callback;
|
|
49
46
|
var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
|
|
50
47
|
onPageNumberChange && onPageNumberChange(page);
|
|
51
48
|
});
|
|
52
|
-
(0, _defineProperty2["default"])(
|
|
49
|
+
(0, _defineProperty2["default"])(_this, "onShowSizeChange", function (current, size) {
|
|
53
50
|
var _this$props$callback2 = _this.props.callback,
|
|
54
51
|
callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
|
|
55
52
|
var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
|
|
@@ -57,7 +54,8 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
57
54
|
});
|
|
58
55
|
return _this;
|
|
59
56
|
}
|
|
60
|
-
(0,
|
|
57
|
+
(0, _inherits2["default"])(SuperPagination, _React$Component);
|
|
58
|
+
return (0, _createClass2["default"])(SuperPagination, [{
|
|
61
59
|
key: "render",
|
|
62
60
|
value: function render() {
|
|
63
61
|
var _this$props = this.props,
|
|
@@ -100,7 +98,6 @@ var SuperPagination = /*#__PURE__*/function (_React$Component) {
|
|
|
100
98
|
}, /*#__PURE__*/_react["default"].createElement(_pagination["default"], props));
|
|
101
99
|
}
|
|
102
100
|
}]);
|
|
103
|
-
return SuperPagination;
|
|
104
101
|
}(_react["default"].Component);
|
|
105
102
|
(0, _defineProperty2["default"])(SuperPagination, "propTypes", {
|
|
106
103
|
maxRecords: _propTypes["default"].number,
|