cloud-b2b 1.1.69 → 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.
Files changed (84) hide show
  1. package/es/Area/Area.js +8 -11
  2. package/es/CodeInput/CodeInput.js +16 -19
  3. package/es/Control/Control.js +21 -3
  4. package/es/Enhance/Dialogs.js +11 -14
  5. package/es/Enhance/Loading.js +15 -18
  6. package/es/Header/Header.js +17 -20
  7. package/es/Header/Vertical.js +11 -14
  8. package/es/ImageView/ImageView.js +10 -13
  9. package/es/InpurCascader/InputCascader.js +11 -14
  10. package/es/InputEditor/InputEditor.js +16 -18
  11. package/es/InputSearch/InputSearch.js +22 -24
  12. package/es/InputSelect/InputSelect.js +14 -17
  13. package/es/InputTreeSelect/InputTreeSelect.js +10 -13
  14. package/es/InputWriting/InputWriting.js +12 -15
  15. package/es/Layout/Layout.js +14 -17
  16. package/es/Link/Link.js +7 -10
  17. package/es/NumberInput/NumberInput.js +13 -16
  18. package/es/Search/Search.js +52 -55
  19. package/es/Search2/Search.js +83 -86
  20. package/es/Search2/Search.less +64 -64
  21. package/es/Search2/package.json +6 -6
  22. package/es/Sidebar/Sidebar.js +11 -14
  23. package/es/Sidebar2/Sidebar.js +13 -16
  24. package/es/SuperForm/SuperForm.js +74 -79
  25. package/es/SuperForm2/SuperForm.js +114 -105
  26. package/es/SuperForm2/SuperForm.less +7 -0
  27. package/es/SuperPagination/SuperPagination.js +8 -11
  28. package/es/SuperTab/SuperTab.js +12 -15
  29. package/es/SuperTab2/SuperTab2.js +13 -16
  30. package/es/SuperTable/DragSortRow.js +12 -15
  31. package/es/SuperTable/FilterDropDown.js +11 -14
  32. package/es/SuperTable/SuperTable.js +70 -73
  33. package/es/SuperTable2/SuperTable2.js +89 -92
  34. package/es/SuperTable2/SuperTableCell.js +27 -30
  35. package/es/SuperTable3/FilterDropDown.js +11 -14
  36. package/es/SuperTable3/SuperTable.js +58 -61
  37. package/es/SuperToolbar/SuperToolbar.js +11 -14
  38. package/es/SuperUpload/SuperUpload.js +74 -74
  39. package/es/Viewer/ImageViews.js +16 -19
  40. package/es/Viewer/Viewer.js +11 -14
  41. package/es/helper.js +18 -17
  42. package/lib/Area/Area.js +8 -11
  43. package/lib/CodeInput/CodeInput.js +16 -19
  44. package/lib/Control/Control.js +21 -3
  45. package/lib/Enhance/Dialogs.js +11 -14
  46. package/lib/Enhance/Loading.js +15 -18
  47. package/lib/Header/Header.js +17 -20
  48. package/lib/Header/Vertical.js +11 -14
  49. package/lib/ImageView/ImageView.js +10 -13
  50. package/lib/InpurCascader/InputCascader.js +11 -14
  51. package/lib/InputEditor/InputEditor.js +16 -18
  52. package/lib/InputSearch/InputSearch.js +22 -24
  53. package/lib/InputSelect/InputSelect.js +14 -17
  54. package/lib/InputTreeSelect/InputTreeSelect.js +10 -13
  55. package/lib/InputWriting/InputWriting.js +12 -15
  56. package/lib/Layout/Layout.js +14 -17
  57. package/lib/LayoutLink/LayoutLink.js +1 -2
  58. package/lib/Link/Link.js +7 -10
  59. package/lib/NumberInput/NumberInput.js +13 -16
  60. package/lib/Search/Search.js +53 -57
  61. package/lib/Search2/Search.js +84 -88
  62. package/lib/Search2/Search.less +64 -64
  63. package/lib/Search2/package.json +6 -6
  64. package/lib/Sidebar/Sidebar.js +11 -14
  65. package/lib/Sidebar2/Sidebar.js +13 -16
  66. package/lib/SuperForm/SuperForm.js +75 -81
  67. package/lib/SuperForm2/SuperForm.js +115 -107
  68. package/lib/SuperForm2/SuperForm.less +7 -0
  69. package/lib/SuperPagination/SuperPagination.js +8 -11
  70. package/lib/SuperTab/SuperTab.js +12 -15
  71. package/lib/SuperTab2/SuperTab2.js +13 -16
  72. package/lib/SuperTable/DragSortRow.js +12 -15
  73. package/lib/SuperTable/FilterDropDown.js +11 -14
  74. package/lib/SuperTable/SuperTable.js +70 -73
  75. package/lib/SuperTable2/SuperTable2.js +90 -94
  76. package/lib/SuperTable2/SuperTableCell.js +27 -30
  77. package/lib/SuperTable3/FilterDropDown.js +11 -14
  78. package/lib/SuperTable3/SuperTable.js +58 -61
  79. package/lib/SuperToolbar/SuperToolbar.js +11 -14
  80. package/lib/SuperUpload/SuperUpload.js +75 -76
  81. package/lib/Viewer/ImageViews.js +16 -19
  82. package/lib/Viewer/Viewer.js +11 -14
  83. package/lib/helper.js +18 -17
  84. package/package.json +1 -1
@@ -15,10 +15,9 @@ import _Checkbox from "antd/es/checkbox";
15
15
  import _typeof from "@babel/runtime-corejs3/helpers/typeof";
16
16
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
17
17
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
18
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
19
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
20
18
  import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
21
19
  import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
20
+ import _inherits from "@babel/runtime-corejs3/helpers/inherits";
22
21
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
23
22
  import _Form from "antd/es/form";
24
23
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
@@ -29,9 +28,9 @@ import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/ins
29
28
  import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
30
29
  import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
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
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context26, _context27; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context26 = ownKeys(Object(t), !0)).call(_context26, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context27 = ownKeys(Object(t))).call(_context27, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
33
- 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); }; }
34
- 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; } }
31
+ 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) { _defineProperty(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; }
32
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(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
  import React from 'react';
36
35
  import PropTypes from 'prop-types';
37
36
  import ReactDOM from 'react-dom';
@@ -41,7 +40,7 @@ import variables from '../variables';
41
40
  var FormItem = _Form.Item;
42
41
  var defaultSize = 'large';
43
42
  var defaultColNum = 4;
44
- var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader', 'checkbox', 'treeSelect'];
43
+ var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'rangePicker', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader', 'checkbox', 'treeSelect'];
45
44
 
46
45
  /**
47
46
  * key:[必须],用于唯一标识该Form下的一个表单元素
@@ -66,13 +65,11 @@ var ControlType = {
66
65
  props: PropTypes.object
67
66
  };
68
67
  var Controlled = /*#__PURE__*/function (_React$Component) {
69
- _inherits(Controlled, _React$Component);
70
- var _super = _createSuper(Controlled);
71
68
  function Controlled(props) {
72
69
  var _this;
73
70
  _classCallCheck(this, Controlled);
74
- _this = _super.call(this, props);
75
- _defineProperty(_assertThisInitialized(_this), "onChange", function (value) {
71
+ _this = _callSuper(this, Controlled, [props]);
72
+ _defineProperty(_this, "onChange", function (value) {
76
73
  var onChange = _this.props.onChange;
77
74
  _this.setState({
78
75
  value: value
@@ -84,7 +81,8 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
84
81
  };
85
82
  return _this;
86
83
  }
87
- _createClass(Controlled, [{
84
+ _inherits(Controlled, _React$Component);
85
+ return _createClass(Controlled, [{
88
86
  key: "componentWillReceiveProps",
89
87
  value: function componentWillReceiveProps(nextProps) {
90
88
  if (this.props.value !== nextProps.value) {
@@ -104,7 +102,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
104
102
  return /*#__PURE__*/React.createElement(Control, props);
105
103
  }
106
104
  }]);
107
- return Controlled;
108
105
  }(React.Component);
109
106
  /**
110
107
  * colNum:[可选],表单的列数,默认为4
@@ -120,8 +117,6 @@ var Controlled = /*#__PURE__*/function (_React$Component) {
120
117
  * onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
121
118
  */
122
119
  var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
123
- _inherits(SuperForm2, _React$Component2);
124
- var _super2 = _createSuper(SuperForm2);
125
120
  function SuperForm2() {
126
121
  var _context;
127
122
  var _this2;
@@ -129,35 +124,35 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
129
124
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
130
125
  args[_key] = arguments[_key];
131
126
  }
132
- _this2 = _super2.call.apply(_super2, _concatInstanceProperty(_context = [this]).call(_context, args));
133
- _defineProperty(_assertThisInitialized(_this2), "onAdd", function (key, title) {
127
+ _this2 = _callSuper(this, SuperForm2, _concatInstanceProperty(_context = []).call(_context, args));
128
+ _defineProperty(_this2, "onAdd", function (key, title) {
134
129
  var onAdd = _this2.props.onAdd;
135
130
  onAdd && onAdd(key, title);
136
131
  });
137
- _defineProperty(_assertThisInitialized(_this2), "onFileChange", function (_ref, file) {
132
+ _defineProperty(_this2, "onFileChange", function (_ref, file) {
138
133
  var key = _ref.key;
139
134
  var onFileChange = _this2.props.onFileChange;
140
135
  onFileChange && onFileChange(key, file);
141
136
  });
142
- _defineProperty(_assertThisInitialized(_this2), "onChange", function (key, value) {
137
+ _defineProperty(_this2, "onChange", function (key, value) {
143
138
  var onChange = _this2.props.onChange;
144
139
  if (onChange) {
145
140
  _this2.onExitValid(key);
146
141
  onChange(key, value);
147
142
  }
148
143
  });
149
- _defineProperty(_assertThisInitialized(_this2), "onGetCode", function (key, value) {
144
+ _defineProperty(_this2, "onGetCode", function (key, value) {
150
145
  var onGetCode = _this2.props.onGetCode;
151
146
  onGetCode && onGetCode();
152
147
  });
153
- _defineProperty(_assertThisInitialized(_this2), "onBlur", function (key, value) {
148
+ _defineProperty(_this2, "onBlur", function (key, value) {
154
149
  var onChange = _this2.props.onChange;
155
150
  if (onChange) {
156
151
  _this2.onExitValid(key);
157
152
  onChange(key, value);
158
153
  }
159
154
  });
160
- _defineProperty(_assertThisInitialized(_this2), "onExitValid", function (key, value) {
155
+ _defineProperty(_this2, "onExitValid", function (key, value) {
161
156
  if (key === _this2.validKey) {
162
157
  _this2.validKey = '';
163
158
  _this2.props.onExitValid();
@@ -165,7 +160,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
165
160
  _this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
166
161
  });
167
162
  // 动态生成getValidState方法
168
- _defineProperty(_assertThisInitialized(_this2), "initValidState", function () {
163
+ _defineProperty(_this2, "initValidState", function () {
169
164
  var _this2$props = _this2.props,
170
165
  value = _this2$props.value,
171
166
  valid = _this2$props.valid;
@@ -186,7 +181,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
186
181
  };
187
182
  _this2.getValidState = valid ? _valid : invalid;
188
183
  });
189
- _defineProperty(_assertThisInitialized(_this2), "validDate", function (_ref3) {
184
+ _defineProperty(_this2, "validDate", function (_ref3) {
190
185
  var key = _ref3.key,
191
186
  type = _ref3.type;
192
187
  return function (date) {
@@ -205,25 +200,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
205
200
  }
206
201
  };
207
202
  });
208
- _defineProperty(_assertThisInitialized(_this2), "getPopupContainer", function () {
203
+ _defineProperty(_this2, "getPopupContainer", function () {
209
204
  var container = _this2.props.container;
210
205
  if (typeof container === 'undefined') {
211
- return ReactDOM.findDOMNode(_assertThisInitialized(_this2));
206
+ return ReactDOM.findDOMNode(_this2);
212
207
  } else if (typeof container === 'boolean') {
213
208
  return document.body;
214
209
  } else {
215
210
  return ReactDOM.findDOMNode(container);
216
211
  }
217
212
  });
218
- _defineProperty(_assertThisInitialized(_this2), "getMaxWidth", function () {
213
+ _defineProperty(_this2, "getMaxWidth", function () {
219
214
  var _this2$props$colNum = _this2.props.colNum,
220
215
  colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
221
216
  return colNum * 1200;
222
217
  });
223
- _defineProperty(_assertThisInitialized(_this2), "getContainer", function () {
218
+ _defineProperty(_this2, "getContainer", function () {
224
219
  return _this2.props.getContainer;
225
220
  });
226
- _defineProperty(_assertThisInitialized(_this2), "getControls", function () {
221
+ _defineProperty(_this2, "getControls", function () {
227
222
  var _this2$props2 = _this2.props,
228
223
  hideControls = _this2$props2.hideControls,
229
224
  controls = _this2$props2.controls;
@@ -237,7 +232,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
237
232
  });
238
233
  }
239
234
  });
240
- _defineProperty(_assertThisInitialized(_this2), "getType", function (_ref4) {
235
+ _defineProperty(_this2, "getType", function (_ref4) {
241
236
  var _context2;
242
237
  var key = _ref4.key,
243
238
  type = _ref4.type;
@@ -256,7 +251,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
256
251
  return type;
257
252
  }
258
253
  });
259
- _defineProperty(_assertThisInitialized(_this2), "specialProps", function (type, _ref5) {
254
+ _defineProperty(_this2, "specialProps", function (type, _ref5) {
260
255
  var key = _ref5.key,
261
256
  _ref5$props = _ref5.props,
262
257
  props = _ref5$props === void 0 ? {} : _ref5$props,
@@ -267,70 +262,70 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
267
262
  return {
268
263
  type: 'textArea',
269
264
  readonly: true,
270
- onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _assertThisInitialized(_this2), key)
265
+ onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _this2, key)
271
266
  };
272
267
  } else if (originType === 'uploadImg') {
273
268
  var _context4;
274
269
  var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
275
270
  return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
276
271
  readonly: true,
277
- onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _assertThisInitialized(_this2), key)
272
+ onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _this2, key)
278
273
  });
279
274
  } else {
280
275
  var _context5;
281
276
  return {
282
- onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _assertThisInitialized(_this2), key)
277
+ onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _this2, key)
283
278
  };
284
279
  }
285
280
  } else if (type === 'text' || type === 'textArea') {
286
281
  var _context6, _context7;
287
282
  return _objectSpread(_objectSpread({}, props), {}, {
288
- onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _assertThisInitialized(_this2), key),
289
- onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _assertThisInitialized(_this2), key)
283
+ onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _this2, key),
284
+ onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _this2, key)
290
285
  });
291
286
  } else if (type === 'date') {
292
287
  var _context8, _context9;
293
288
  var propsObj = _objectSpread(_objectSpread({}, props), {}, {
294
- onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _assertThisInitialized(_this2), key),
295
- onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _assertThisInitialized(_this2), key)
289
+ onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _this2, key),
290
+ onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _this2, key)
296
291
  });
297
292
  if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
298
- var _context10;
299
- propsObj.onOpenChange = _bindInstanceProperty(_context10 = _this2.props.onOpenChange).call(_context10, _assertThisInitialized(_this2), key);
293
+ var _context0;
294
+ propsObj.onOpenChange = _bindInstanceProperty(_context0 = _this2.props.onOpenChange).call(_context0, _this2, key);
300
295
  }
301
296
  return propsObj;
302
297
  } else if (type === 'captcha') {
303
- var _context11, _context12, _context13;
298
+ var _context1, _context10, _context11;
304
299
  return _objectSpread(_objectSpread({}, props), {}, {
305
- onChange: _bindInstanceProperty(_context11 = _this2.onBlur).call(_context11, _assertThisInitialized(_this2), key),
306
- onBlur: _bindInstanceProperty(_context12 = _this2.onExitValid).call(_context12, _assertThisInitialized(_this2), key),
307
- onGetCode: _bindInstanceProperty(_context13 = _this2.onGetCode).call(_context13, _assertThisInitialized(_this2), key)
300
+ onChange: _bindInstanceProperty(_context1 = _this2.onBlur).call(_context1, _this2, key),
301
+ onBlur: _bindInstanceProperty(_context10 = _this2.onExitValid).call(_context10, _this2, key),
302
+ onGetCode: _bindInstanceProperty(_context11 = _this2.onGetCode).call(_context11, _this2, key)
308
303
  });
309
304
  } else if (type === 'area') {
310
- var _context14, _context15;
305
+ var _context12, _context13;
311
306
  return _objectSpread(_objectSpread({}, props), {}, {
312
- onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _assertThisInitialized(_this2), key),
313
- onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _assertThisInitialized(_this2), key),
307
+ onChange: _bindInstanceProperty(_context12 = _this2.onBlur).call(_context12, _this2, key),
308
+ onBlur: _bindInstanceProperty(_context13 = _this2.onExitValid).call(_context13, _this2, key),
314
309
  onAreaSearch: _this2.props.onAreaSearch
315
310
  });
316
311
  } else if (type === 'uploadImg') {
317
- var _context16, _context17;
312
+ var _context14, _context15;
318
313
  var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
319
314
  return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
320
- onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _assertThisInitialized(_this2), key),
321
- onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _assertThisInitialized(_this2), key)
315
+ onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _this2, key),
316
+ onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _this2, key)
322
317
  });
323
318
  } else if (type === 'double') {
324
319
  return props;
325
320
  } else {
326
- var _context18, _context19;
321
+ var _context16, _context17;
327
322
  return _objectSpread(_objectSpread({}, props), {}, {
328
- onChange: _bindInstanceProperty(_context18 = _this2.onBlur).call(_context18, _assertThisInitialized(_this2), key),
329
- onBlur: _bindInstanceProperty(_context19 = _this2.onExitValid).call(_context19, _assertThisInitialized(_this2), key)
323
+ onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _this2, key),
324
+ onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _this2, key)
330
325
  });
331
326
  }
332
327
  });
333
- _defineProperty(_assertThisInitialized(_this2), "getControlProps", function (control, status) {
328
+ _defineProperty(_this2, "getControlProps", function (control, status) {
334
329
  var _this2$props3 = _this2.props,
335
330
  _this2$props3$value = _this2$props3.value,
336
331
  value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
@@ -345,25 +340,25 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
345
340
  value: makeString(value[control.key])
346
341
  });
347
342
  });
348
- _defineProperty(_assertThisInitialized(_this2), "getOptions", function (key, options) {
343
+ _defineProperty(_this2, "getOptions", function (key, options) {
349
344
  var higher = _this2.props.options || {};
350
345
  return higher[key] || options;
351
346
  });
352
- _defineProperty(_assertThisInitialized(_this2), "toEmpty", function (props) {});
353
- _defineProperty(_assertThisInitialized(_this2), "toText", function (props) {
347
+ _defineProperty(_this2, "toEmpty", function (props) {});
348
+ _defineProperty(_this2, "toText", function (props) {
354
349
  return /*#__PURE__*/React.createElement(Controlled, props);
355
350
  });
356
- _defineProperty(_assertThisInitialized(_this2), "toPassword", function (props) {
351
+ _defineProperty(_this2, "toPassword", function (props) {
357
352
  return /*#__PURE__*/React.createElement(Controlled, props);
358
353
  });
359
- _defineProperty(_assertThisInitialized(_this2), "toEditor", function (props, control) {
354
+ _defineProperty(_this2, "toEditor", function (props, control) {
360
355
  props.inputKey = control.key;
361
356
  return /*#__PURE__*/React.createElement(Controlled, props);
362
357
  });
363
- _defineProperty(_assertThisInitialized(_this2), "toSelectWriting", function (props, control) {
358
+ _defineProperty(_this2, "toSelectWriting", function (props, control) {
364
359
  return /*#__PURE__*/React.createElement(Controlled, props);
365
360
  });
366
- _defineProperty(_assertThisInitialized(_this2), "toTextArea", function (props, control) {
361
+ _defineProperty(_this2, "toTextArea", function (props, control) {
367
362
  if (control.allFullFather) {
368
363
  props.rows = control.rows;
369
364
  props.maxLength = control.maxLength;
@@ -378,30 +373,31 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
378
373
  }
379
374
  return /*#__PURE__*/React.createElement(Controlled, props);
380
375
  });
381
- _defineProperty(_assertThisInitialized(_this2), "toNumber", function (props) {
376
+ _defineProperty(_this2, "toNumber", function (props) {
382
377
  props.defaultValue = props.value;
383
378
  delete props.value;
384
379
  return /*#__PURE__*/React.createElement(Control, props);
385
380
  });
386
- _defineProperty(_assertThisInitialized(_this2), "toDoubleInput", function (props, control, cc) {
387
- var _context20, _context21;
381
+ _defineProperty(_this2, "toDoubleInput", function (props, control, cc) {
382
+ var _context18, _context19;
388
383
  props.defaultValue = props.value;
389
384
  props.doubleKey = props.key;
390
385
  props.doubleValue = helper.getObject(cc, props.key);
391
- props.onChangeKey1 = _bindInstanceProperty(_context20 = _this2.onChange).call(_context20, _assertThisInitialized(_this2), props.key[0]);
392
- props.onChangeKey2 = _bindInstanceProperty(_context21 = _this2.onChange).call(_context21, _assertThisInitialized(_this2), props.key[1]);
386
+ props.onChangeKey1 = _bindInstanceProperty(_context18 = _this2.onChange).call(_context18, _this2, props.key[0]);
387
+ props.onChangeKey2 = _bindInstanceProperty(_context19 = _this2.onChange).call(_context19, _this2, props.key[1]);
393
388
  delete props.value;
394
389
  return /*#__PURE__*/React.createElement(Control, props);
395
390
  });
396
- _defineProperty(_assertThisInitialized(_this2), "toSelect", function (props, _ref6) {
391
+ _defineProperty(_this2, "toSelect", function (props, _ref6) {
397
392
  var options = _ref6.options,
398
393
  key = _ref6.key;
399
394
  props.getPopupContainer = _this2.getPopupContainer;
400
395
  props.options = _this2.getOptions(key, options);
401
396
  props.dropdownMatchSelectWidth = false;
397
+ props.placeholder = filter.placeholder || '';
402
398
  return /*#__PURE__*/React.createElement(Control, props);
403
399
  });
404
- _defineProperty(_assertThisInitialized(_this2), "toTreeSelect", function (props, filter) {
400
+ _defineProperty(_this2, "toTreeSelect", function (props, filter) {
405
401
  var container = _this2.getContainer();
406
402
  container && (props.getPopupContainer = container);
407
403
  props.options = _this2.getOptions(filter);
@@ -409,7 +405,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
409
405
  props.placeholder = filter.placeholder || '';
410
406
  return /*#__PURE__*/React.createElement(Control, props);
411
407
  });
412
- _defineProperty(_assertThisInitialized(_this2), "createSearchEvent", function (control) {
408
+ _defineProperty(_this2, "createSearchEvent", function (control) {
413
409
  if (_this2.props.onSearch) {
414
410
  return function (value) {
415
411
  return _this2.props.onSearch(control.key, value, control);
@@ -418,7 +414,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
418
414
  return null;
419
415
  }
420
416
  });
421
- _defineProperty(_assertThisInitialized(_this2), "createGetCodeEvent", function (control) {
417
+ _defineProperty(_this2, "createGetCodeEvent", function (control) {
422
418
  if (_this2.props.onGetCode) {
423
419
  return function (value) {
424
420
  return _this2.props.onGetCode(control.key, value, control);
@@ -427,14 +423,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
427
423
  return null;
428
424
  }
429
425
  });
430
- _defineProperty(_assertThisInitialized(_this2), "toSearch", function (props, control) {
426
+ _defineProperty(_this2, "toSearch", function (props, control) {
431
427
  props.getPopupContainer = _this2.getPopupContainer;
432
428
  props.options = _this2.getOptions(control.key, control.options);
433
429
  props.onSearch = _this2.createSearchEvent(control);
434
430
  props.dropdownMatchSelectWidth = false;
431
+ props.placeholder = props.placeholder || '';
435
432
  return /*#__PURE__*/React.createElement(Control, props);
436
433
  });
437
- _defineProperty(_assertThisInitialized(_this2), "toDate", function (props, _ref7) {
434
+ _defineProperty(_this2, "toDate", function (props, _ref7) {
438
435
  var rule = _ref7.rule;
439
436
  props.getCalendarContainer = _this2.getPopupContainer;
440
437
  props.style = {
@@ -443,32 +440,42 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
443
440
  rule && (props.disabledDate = _this2.validDate(rule));
444
441
  return /*#__PURE__*/React.createElement(Control, props);
445
442
  });
446
- _defineProperty(_assertThisInitialized(_this2), "toRadioGroup", function (props, _ref8) {
447
- var key = _ref8.key,
448
- options = _ref8.options;
443
+ _defineProperty(_this2, "toRangePicker", function (props, _ref8) {
444
+ var rule = _ref8.rule;
445
+ props.getCalendarContainer = _this2.getPopupContainer;
446
+ props.style = {
447
+ width: '100%'
448
+ };
449
+ // rule && (props.disabledDate = this.validDate(rule));
450
+ return /*#__PURE__*/React.createElement(Control, props);
451
+ });
452
+ _defineProperty(_this2, "toRadioGroup", function (props, _ref9) {
453
+ var key = _ref9.key,
454
+ options = _ref9.options;
449
455
  props.options = _this2.getOptions(key, options);
450
456
  return /*#__PURE__*/React.createElement(Control, props);
451
457
  });
452
- _defineProperty(_assertThisInitialized(_this2), "captcha", function (props, control) {
458
+ _defineProperty(_this2, "captcha", function (props, control) {
453
459
  props.onGetCode = _this2.props.onGetCode;
454
460
  return /*#__PURE__*/React.createElement(Control, props);
455
461
  });
456
- _defineProperty(_assertThisInitialized(_this2), "toReadonly", function (props, _ref9) {
457
- var options = _ref9.options,
458
- key = _ref9.key;
462
+ _defineProperty(_this2, "toReadonly", function (props, _ref0) {
463
+ var options = _ref0.options,
464
+ key = _ref0.key;
459
465
  props.value = getTitle(props.value, _this2.getOptions(key, options));
460
466
  return /*#__PURE__*/React.createElement(Control, props);
461
467
  });
462
- _defineProperty(_assertThisInitialized(_this2), "selectSearch", function (props, control) {
468
+ _defineProperty(_this2, "selectSearch", function (props, control) {
463
469
  props.getPopupContainer = _this2.getPopupContainer;
464
470
  props.options = _this2.getOptions(control.key, control.options);
465
471
  props.onSearch = _this2.createSearchEvent(control);
466
472
  props.dropdownMatchSelectWidth = false;
473
+ props.placeholder = props.placeholder || '';
467
474
  return /*#__PURE__*/React.createElement(Control, props);
468
475
  });
469
- _defineProperty(_assertThisInitialized(_this2), "area", function (props, _ref10) {
470
- var key = _ref10.key,
471
- options = _ref10.options;
476
+ _defineProperty(_this2, "area", function (props, _ref1) {
477
+ var key = _ref1.key,
478
+ options = _ref1.options;
472
479
  var readonly = _this2.props.readonly;
473
480
  props.parentKey = key;
474
481
  props.options = _this2.getOptions(key, options);
@@ -478,17 +485,17 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
478
485
  }) ? true : false;
479
486
  return /*#__PURE__*/React.createElement(Control, props);
480
487
  });
481
- _defineProperty(_assertThisInitialized(_this2), "uploadImg", function (props, control) {
482
- var _context22;
488
+ _defineProperty(_this2, "uploadImg", function (props, control) {
489
+ var _context20;
483
490
  var readonly = _this2.props.readonly;
484
491
  props.required = control.required || false;
485
- props.onFileChange = _bindInstanceProperty(_context22 = _this2.onFileChange).call(_context22, _assertThisInitialized(_this2), control);
492
+ props.onFileChange = _bindInstanceProperty(_context20 = _this2.onFileChange).call(_context20, _this2, control);
486
493
  props.readonly = readonly === true || _Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
487
494
  return readonlyKey === control.key;
488
495
  }) ? true : false;
489
496
  return /*#__PURE__*/React.createElement(Control, props);
490
497
  });
491
- _defineProperty(_assertThisInitialized(_this2), "toCascader", function (props, control) {
498
+ _defineProperty(_this2, "toCascader", function (props, control) {
492
499
  var container = _this2.getContainer();
493
500
  container && (props.getPopupContainer = container);
494
501
  props.options = control.options || [];
@@ -497,16 +504,16 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
497
504
  props.loadData = _this2.createSearchEvent(control);
498
505
  return /*#__PURE__*/React.createElement(Control, props);
499
506
  });
500
- _defineProperty(_assertThisInitialized(_this2), "toCheckbox", function (props, control) {
501
- var _context23;
507
+ _defineProperty(_this2, "toCheckbox", function (props, control) {
508
+ var _context21;
502
509
  var options = control.options || [];
503
510
  return /*#__PURE__*/React.createElement(_Checkbox.Group, {
504
511
  options: options,
505
- onChange: _bindInstanceProperty(_context23 = _this2.onBlur).call(_context23, _assertThisInitialized(_this2), control.key),
512
+ onChange: _bindInstanceProperty(_context21 = _this2.onBlur).call(_context21, _this2, control.key),
506
513
  value: _this2.props.value[control.key]
507
514
  });
508
515
  });
509
- _defineProperty(_assertThisInitialized(_this2), "toControl", function (props, control) {
516
+ _defineProperty(_this2, "toControl", function (props, control) {
510
517
  switch (props.type) {
511
518
  case 'readonly':
512
519
  return _this2.toReadonly(props, control);
@@ -524,6 +531,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
524
531
  return _this2.toSearch(props, control);
525
532
  case 'date':
526
533
  return _this2.toDate(props, control);
534
+ case 'rangePicker':
535
+ return _this2.toRangePicker(props, control);
527
536
  case 'radioGroup':
528
537
  return _this2.toRadioGroup(props, control);
529
538
  case 'textArea':
@@ -554,15 +563,15 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
554
563
  return 'type error';
555
564
  }
556
565
  });
557
- _defineProperty(_assertThisInitialized(_this2), "toLabel", function (_ref11, type) {
558
- var title = _ref11.title,
559
- showAdd = _ref11.showAdd,
560
- key = _ref11.key,
561
- showInfo = _ref11.showInfo,
562
- showInfoTitle = _ref11.showInfoTitle;
566
+ _defineProperty(_this2, "toLabel", function (_ref10, type) {
567
+ var title = _ref10.title,
568
+ showAdd = _ref10.showAdd,
569
+ key = _ref10.key,
570
+ showInfo = _ref10.showInfo,
571
+ showInfoTitle = _ref10.showInfoTitle;
563
572
  if (showAdd && type !== 'readonly') {
564
- var _context24;
565
- var onClick = _bindInstanceProperty(_context24 = _this2.onAdd).call(_context24, _assertThisInitialized(_this2), key, title);
573
+ var _context22;
574
+ var onClick = _bindInstanceProperty(_context22 = _this2.onAdd).call(_context22, _this2, key, title);
566
575
  return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
567
576
  role: "add",
568
577
  type: "plus-circle-o",
@@ -578,7 +587,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
578
587
  return title;
579
588
  }
580
589
  });
581
- _defineProperty(_assertThisInitialized(_this2), "toCol", function (span, control) {
590
+ _defineProperty(_this2, "toCol", function (span, control) {
582
591
  var factor = control.span || 1;
583
592
  var status = _this2.getValidState(control);
584
593
  var controlProps = _this2.getControlProps(control, status);
@@ -595,7 +604,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
595
604
  key: control.key
596
605
  }, checkable && /*#__PURE__*/React.createElement(_Checkbox, {
597
606
  className: variables('SuperForm2').checkbox,
598
- onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _assertThisInitialized(_this2), control),
607
+ onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _this2, control),
599
608
  checked: control.checked
600
609
  }), /*#__PURE__*/React.createElement(FormItem, _extends({}, itemProps, {
601
610
  className: checkable ? variables('SuperForm2').formItemWithCheckbox : '',
@@ -623,8 +632,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
623
632
  }
624
633
  });
625
634
  });
626
- _defineProperty(_assertThisInitialized(_this2), "toCols", function () {
627
- var _context25;
635
+ _defineProperty(_this2, "toCols", function () {
636
+ var _context23;
628
637
  var _this2$props5 = _this2.props,
629
638
  _this2$props5$colNum = _this2$props5.colNum,
630
639
  colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
@@ -633,7 +642,7 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
633
642
  colNum = 1;
634
643
  }
635
644
  var span = 24 / colNum;
636
- return _mapInstanceProperty(_context25 = _this2.getControls()).call(_context25, function (control) {
645
+ return _mapInstanceProperty(_context23 = _this2.getControls()).call(_context23, function (control) {
637
646
  if (allFullFather) {
638
647
  control.allFullFather = allFullFather;
639
648
  }
@@ -642,7 +651,8 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
642
651
  });
643
652
  return _this2;
644
653
  }
645
- _createClass(SuperForm2, [{
654
+ _inherits(SuperForm2, _React$Component2);
655
+ return _createClass(SuperForm2, [{
646
656
  key: "render",
647
657
  value: function render() {
648
658
  this.initValidState();
@@ -660,7 +670,6 @@ var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
660
670
  }, this.toCols())));
661
671
  }
662
672
  }]);
663
- return SuperForm2;
664
673
  }(React.Component);
665
674
  _defineProperty(SuperForm2, "propTypes", {
666
675
  controls: PropTypes.arrayOf(PropTypes.shape(ControlType)).isRequired,
@@ -34,6 +34,13 @@
34
34
  :global(.ant-select-selection--multiple) {
35
35
  border-top-width: 1px;
36
36
  }
37
+ :global(.ant-calendar-picker-input) {
38
+ display: flex;
39
+ }
40
+ :global(.has-error .ant-calendar-picker-input) {
41
+ border-color: #ff4d4f !important;
42
+ box-shadow:0 0 2px rgba(245, 34, 45, 0.2) !important;
43
+ }
37
44
 
38
45
  :global(.ant-radio-group-small) {
39
46
  display: block;