cloud-b2b 1.1.57 → 1.1.59

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 (308) hide show
  1. package/package.json +44 -22
  2. package/src/Area/Area.js +94 -0
  3. package/src/Card/Card.js +16 -0
  4. package/src/CodeInput/CodeInput.js +76 -0
  5. package/src/Control/Control.js +338 -0
  6. package/src/Control/event.js +45 -0
  7. package/src/Enhance/Dialogs.js +24 -0
  8. package/src/Enhance/Loading.js +83 -0
  9. package/{es → src}/Enhance/index.js +8 -6
  10. package/src/Header/Header.js +149 -0
  11. package/src/Header/Vertical.js +74 -0
  12. package/src/ImageView/ImageView.js +62 -0
  13. package/src/Indent/Indent.js +12 -0
  14. package/src/InpurCascader/InputCascader.js +83 -0
  15. package/src/InputEditor/InputEditor.js +93 -0
  16. package/src/InputSearch/InputSearch.js +186 -0
  17. package/src/InputSelect/InputSelect.js +103 -0
  18. package/src/InputTreeSelect/InputTreeSelect.js +87 -0
  19. package/src/InputWriting/InputWriting.js +65 -0
  20. package/src/Layout/Layout.js +121 -0
  21. package/src/LayoutLink/LayoutLink.js +59 -0
  22. package/src/Link/Link.js +57 -0
  23. package/src/Loading/Loading.js +15 -0
  24. package/src/Loading2/Loading2.js +15 -0
  25. package/src/ModalWithDrag/ModalWithDrag.js +17 -0
  26. package/{es → src}/ModalWithDrag/drag.js +128 -116
  27. package/src/NumberInput/NumberInput.js +137 -0
  28. package/src/Search/Search.js +368 -0
  29. package/src/Search2/Search.js +436 -0
  30. package/{lib/Search → src/Search2}/Search.less +65 -63
  31. package/{lib/Search → src/Search2}/package.json +6 -6
  32. package/src/Sidebar/Sidebar.js +111 -0
  33. package/src/Sidebar2/Sidebar.js +143 -0
  34. package/src/SuperForm/SuperForm.js +519 -0
  35. package/src/SuperForm2/SuperForm.js +588 -0
  36. package/src/SuperIcon/SuperIcon.js +14 -0
  37. package/src/SuperPagination/SuperPagination.js +65 -0
  38. package/src/SuperTab/SuperTab.js +84 -0
  39. package/src/SuperTab2/SuperTab2.js +94 -0
  40. package/src/SuperTable/DragSortRow.js +62 -0
  41. package/src/SuperTable/FilterDropDown.js +111 -0
  42. package/src/SuperTable/SuperTable.js +590 -0
  43. package/src/SuperTable/fixed.js +34 -0
  44. package/src/SuperTable2/SuperTable2.js +624 -0
  45. package/src/SuperTable2/SuperTableCell.js +175 -0
  46. package/src/SuperTable3/FilterDropDown.js +111 -0
  47. package/src/SuperTable3/SuperTable.js +498 -0
  48. package/src/SuperTable3/fixed.js +34 -0
  49. package/src/SuperToolbar/SuperToolbar.js +128 -0
  50. package/src/SuperUpload/SuperUpload.js +137 -0
  51. package/src/Title/Title.js +18 -0
  52. package/src/Viewer/ImageViews.js +220 -0
  53. package/src/Viewer/Viewer.js +97 -0
  54. package/src/WingBlank/WingBlank.js +14 -0
  55. package/src/helper.js +185 -0
  56. package/{es → src}/history.js +6 -6
  57. package/src/index.js +39 -0
  58. package/src/variables.js +5 -0
  59. package/test/index.html +10 -0
  60. package/test/test.js +16 -0
  61. package/test/test.less +12 -0
  62. package/test/webpack.config.js +71 -0
  63. package/tools/babel.config.js +14 -0
  64. package/tools/build.js +70 -0
  65. package/tools/publish.js +9 -0
  66. package/tools/util.js +53 -0
  67. package/es/Area/Area.js +0 -138
  68. package/es/Card/Card.js +0 -19
  69. package/es/CodeInput/CodeInput.js +0 -120
  70. package/es/Control/Control.js +0 -444
  71. package/es/Control/event.js +0 -43
  72. package/es/Enhance/Dialogs.js +0 -49
  73. package/es/Enhance/Loading.js +0 -128
  74. package/es/Header/Header.js +0 -159
  75. package/es/Header/Vertical.js +0 -103
  76. package/es/ImageView/ImageView.js +0 -97
  77. package/es/Indent/Indent.js +0 -19
  78. package/es/InpurCascader/InputCascader.js +0 -114
  79. package/es/InputEditor/InputEditor.js +0 -171
  80. package/es/InputSearch/InputSearch.js +0 -263
  81. package/es/InputSelect/InputSelect.js +0 -157
  82. package/es/InputTreeSelect/InputTreeSelect.js +0 -118
  83. package/es/InputWriting/InputWriting.js +0 -82
  84. package/es/Layout/Layout.js +0 -198
  85. package/es/LayoutLink/LayoutLink.js +0 -73
  86. package/es/Link/Link.js +0 -82
  87. package/es/Loading/Loading.js +0 -13
  88. package/es/Loading2/Loading2.js +0 -9
  89. package/es/ModalWithDrag/ModalWithDrag.js +0 -29
  90. package/es/NumberInput/NumberInput.js +0 -197
  91. package/es/Search/Search.js +0 -494
  92. package/es/Sidebar/Sidebar.js +0 -141
  93. package/es/Sidebar2/Sidebar.js +0 -162
  94. package/es/SuperForm/SuperForm.js +0 -593
  95. package/es/SuperForm2/SuperForm.js +0 -682
  96. package/es/SuperIcon/SuperIcon.js +0 -27
  97. package/es/SuperPagination/SuperPagination.js +0 -106
  98. package/es/SuperTab/SuperTab.js +0 -104
  99. package/es/SuperTab2/SuperTab2.js +0 -142
  100. package/es/SuperTable/DragSortRow.js +0 -94
  101. package/es/SuperTable/FilterDropDown.js +0 -161
  102. package/es/SuperTable/SuperTable.js +0 -805
  103. package/es/SuperTable/fixed.js +0 -34
  104. package/es/SuperTable2/SuperTable2.js +0 -923
  105. package/es/SuperTable2/SuperTableCell.js +0 -215
  106. package/es/SuperTable3/FilterDropDown.js +0 -161
  107. package/es/SuperTable3/SuperTable.js +0 -662
  108. package/es/SuperTable3/fixed.js +0 -34
  109. package/es/SuperToolbar/SuperToolbar.js +0 -192
  110. package/es/SuperUpload/SuperUpload.js +0 -356
  111. package/es/Title/Title.js +0 -33
  112. package/es/Viewer/ImageViews.js +0 -255
  113. package/es/Viewer/Viewer.js +0 -119
  114. package/es/WingBlank/WingBlank.js +0 -16
  115. package/es/helper.js +0 -241
  116. package/es/index.js +0 -37
  117. package/es/variables.js +0 -6
  118. package/lib/Area/Area.js +0 -146
  119. package/lib/Area/package.json +0 -6
  120. package/lib/Card/Card.js +0 -27
  121. package/lib/Card/package.json +0 -6
  122. package/lib/CodeInput/CodeInput.js +0 -128
  123. package/lib/CodeInput/package.json +0 -6
  124. package/lib/Control/Control.js +0 -450
  125. package/lib/Control/event.js +0 -51
  126. package/lib/Control/package.json +0 -6
  127. package/lib/Enhance/Dialogs.js +0 -57
  128. package/lib/Enhance/Loading.js +0 -135
  129. package/lib/Enhance/index.js +0 -25
  130. package/lib/Enhance/package.json +0 -6
  131. package/lib/Header/Header.js +0 -166
  132. package/lib/Header/Header.less +0 -95
  133. package/lib/Header/Vertical.js +0 -111
  134. package/lib/Header/Vertical.less +0 -60
  135. package/lib/Header/package.json +0 -6
  136. package/lib/ImageView/ImageView.js +0 -105
  137. package/lib/ImageView/ImageView.less +0 -14
  138. package/lib/ImageView/package.json +0 -6
  139. package/lib/Indent/Indent.js +0 -27
  140. package/lib/Indent/package.json +0 -6
  141. package/lib/InpurCascader/InputCascader.js +0 -121
  142. package/lib/InpurCascader/package.json +0 -6
  143. package/lib/InputEditor/InputEditor.js +0 -179
  144. package/lib/InputEditor/inputEditor.less +0 -8
  145. package/lib/InputEditor/package.json +0 -6
  146. package/lib/InputSearch/InputSearch.js +0 -271
  147. package/lib/InputSearch/package.json +0 -6
  148. package/lib/InputSelect/InputSelect.js +0 -165
  149. package/lib/InputSelect/package.json +0 -6
  150. package/lib/InputTreeSelect/InputTreeSelect.js +0 -125
  151. package/lib/InputTreeSelect/package.json +0 -6
  152. package/lib/InputWriting/InputWriting.js +0 -90
  153. package/lib/InputWriting/package.json +0 -6
  154. package/lib/Layout/Layout.js +0 -206
  155. package/lib/Layout/Layout.less +0 -28
  156. package/lib/Layout/package.json +0 -6
  157. package/lib/LayoutLink/LayoutLink.js +0 -85
  158. package/lib/LayoutLink/LayoutLink.less +0 -53
  159. package/lib/LayoutLink/package.json +0 -6
  160. package/lib/Link/Link.js +0 -90
  161. package/lib/Link/package.json +0 -6
  162. package/lib/Loading/Loading.js +0 -21
  163. package/lib/Loading/Loading.less +0 -13
  164. package/lib/Loading/package.json +0 -6
  165. package/lib/Loading2/Loading2.js +0 -17
  166. package/lib/Loading2/Loading2.less +0 -19
  167. package/lib/Loading2/package.json +0 -6
  168. package/lib/ModalWithDrag/ModalWithDrag.js +0 -37
  169. package/lib/ModalWithDrag/ModalWithDrag.less +0 -6
  170. package/lib/ModalWithDrag/drag.js +0 -124
  171. package/lib/ModalWithDrag/package.json +0 -6
  172. package/lib/NumberInput/NumberInput.js +0 -205
  173. package/lib/NumberInput/package.json +0 -6
  174. package/lib/Search/Search.js +0 -506
  175. package/lib/Sidebar/Sidebar.js +0 -149
  176. package/lib/Sidebar/Sidebar.less +0 -78
  177. package/lib/Sidebar/package.json +0 -6
  178. package/lib/Sidebar2/Sidebar.js +0 -170
  179. package/lib/Sidebar2/Sidebar.less +0 -153
  180. package/lib/Sidebar2/package.json +0 -6
  181. package/lib/SuperForm/SuperForm.js +0 -604
  182. package/lib/SuperForm/SuperForm.less +0 -52
  183. package/lib/SuperForm/package.json +0 -6
  184. package/lib/SuperForm2/SuperForm.js +0 -693
  185. package/lib/SuperForm2/SuperForm.less +0 -52
  186. package/lib/SuperForm2/package.json +0 -6
  187. package/lib/SuperIcon/SuperIcon.js +0 -35
  188. package/lib/SuperIcon/package.json +0 -6
  189. package/lib/SuperPagination/SuperPagination.js +0 -114
  190. package/lib/SuperPagination/package.json +0 -6
  191. package/lib/SuperTab/SuperTab.js +0 -112
  192. package/lib/SuperTab/SuperTab.less +0 -43
  193. package/lib/SuperTab/package.json +0 -6
  194. package/lib/SuperTab2/SuperTab2.js +0 -150
  195. package/lib/SuperTab2/SuperTab2.less +0 -18
  196. package/lib/SuperTab2/package.json +0 -6
  197. package/lib/SuperTable/DragSortRow.js +0 -102
  198. package/lib/SuperTable/DragSortRow.less +0 -17
  199. package/lib/SuperTable/FilterDropDown.js +0 -169
  200. package/lib/SuperTable/FilterDropDown.less +0 -30
  201. package/lib/SuperTable/SuperTable.js +0 -813
  202. package/lib/SuperTable/SuperTable.less +0 -132
  203. package/lib/SuperTable/fixed.js +0 -42
  204. package/lib/SuperTable/package.json +0 -6
  205. package/lib/SuperTable2/SuperTable2.js +0 -935
  206. package/lib/SuperTable2/SuperTable2.less +0 -118
  207. package/lib/SuperTable2/SuperTableCell.js +0 -220
  208. package/lib/SuperTable2/package.json +0 -6
  209. package/lib/SuperTable3/FilterDropDown.js +0 -169
  210. package/lib/SuperTable3/FilterDropDown.less +0 -29
  211. package/lib/SuperTable3/SuperTable.js +0 -670
  212. package/lib/SuperTable3/SuperTable.less +0 -99
  213. package/lib/SuperTable3/fixed.js +0 -42
  214. package/lib/SuperTable3/package.json +0 -6
  215. package/lib/SuperToolbar/SuperToolbar.js +0 -200
  216. package/lib/SuperToolbar/SuperToolbar.less +0 -17
  217. package/lib/SuperToolbar/package.json +0 -6
  218. package/lib/SuperUpload/SuperUpload.js +0 -367
  219. package/lib/SuperUpload/SuperUpload.less +0 -28
  220. package/lib/SuperUpload/package.json +0 -6
  221. package/lib/Title/Title.js +0 -41
  222. package/lib/Title/Title.less +0 -35
  223. package/lib/Title/package.json +0 -6
  224. package/lib/Viewer/ImageViews.js +0 -263
  225. package/lib/Viewer/Viewer.js +0 -127
  226. package/lib/Viewer/Viewer.less +0 -67
  227. package/lib/Viewer/imgView.less +0 -59
  228. package/lib/Viewer/package.json +0 -7
  229. package/lib/WingBlank/WingBlank.js +0 -24
  230. package/lib/WingBlank/WingBlank.less +0 -12
  231. package/lib/WingBlank/package.json +0 -6
  232. package/lib/adjust.less +0 -89
  233. package/lib/helper.js +0 -247
  234. package/lib/history.js +0 -12
  235. package/lib/index.js +0 -271
  236. package/lib/index.less +0 -31
  237. package/lib/style.less +0 -30
  238. package/lib/variables.js +0 -14
  239. package/lib/variables.less +0 -73
  240. /package/{es → src}/Area/package.json +0 -0
  241. /package/{es → src}/Card/package.json +0 -0
  242. /package/{es → src}/CodeInput/package.json +0 -0
  243. /package/{es → src}/Control/package.json +0 -0
  244. /package/{es → src}/Enhance/package.json +0 -0
  245. /package/{es → src}/Header/Header.less +0 -0
  246. /package/{es → src}/Header/Vertical.less +0 -0
  247. /package/{es → src}/Header/package.json +0 -0
  248. /package/{es → src}/ImageView/ImageView.less +0 -0
  249. /package/{es → src}/ImageView/package.json +0 -0
  250. /package/{es → src}/Indent/package.json +0 -0
  251. /package/{es → src}/InpurCascader/package.json +0 -0
  252. /package/{es → src}/InputEditor/inputEditor.less +0 -0
  253. /package/{es → src}/InputEditor/package.json +0 -0
  254. /package/{es → src}/InputSearch/package.json +0 -0
  255. /package/{es → src}/InputSelect/package.json +0 -0
  256. /package/{es → src}/InputTreeSelect/package.json +0 -0
  257. /package/{es → src}/InputWriting/package.json +0 -0
  258. /package/{es → src}/Layout/Layout.less +0 -0
  259. /package/{es → src}/Layout/package.json +0 -0
  260. /package/{es → src}/LayoutLink/LayoutLink.less +0 -0
  261. /package/{es → src}/LayoutLink/package.json +0 -0
  262. /package/{es → src}/Link/package.json +0 -0
  263. /package/{es → src}/Loading/Loading.less +0 -0
  264. /package/{es → src}/Loading/package.json +0 -0
  265. /package/{es → src}/Loading2/Loading2.less +0 -0
  266. /package/{es → src}/Loading2/package.json +0 -0
  267. /package/{es → src}/ModalWithDrag/ModalWithDrag.less +0 -0
  268. /package/{es → src}/ModalWithDrag/package.json +0 -0
  269. /package/{es → src}/NumberInput/package.json +0 -0
  270. /package/{es → src}/Search/Search.less +0 -0
  271. /package/{es → src}/Search/package.json +0 -0
  272. /package/{es → src}/Sidebar/Sidebar.less +0 -0
  273. /package/{es → src}/Sidebar/package.json +0 -0
  274. /package/{es → src}/Sidebar2/Sidebar.less +0 -0
  275. /package/{es → src}/Sidebar2/package.json +0 -0
  276. /package/{es → src}/SuperForm/SuperForm.less +0 -0
  277. /package/{es → src}/SuperForm/package.json +0 -0
  278. /package/{es → src}/SuperForm2/SuperForm.less +0 -0
  279. /package/{es → src}/SuperForm2/package.json +0 -0
  280. /package/{es → src}/SuperIcon/package.json +0 -0
  281. /package/{es → src}/SuperPagination/package.json +0 -0
  282. /package/{es → src}/SuperTab/SuperTab.less +0 -0
  283. /package/{es → src}/SuperTab/package.json +0 -0
  284. /package/{es → src}/SuperTab2/SuperTab2.less +0 -0
  285. /package/{es → src}/SuperTab2/package.json +0 -0
  286. /package/{es → src}/SuperTable/DragSortRow.less +0 -0
  287. /package/{es → src}/SuperTable/FilterDropDown.less +0 -0
  288. /package/{es → src}/SuperTable/SuperTable.less +0 -0
  289. /package/{es → src}/SuperTable/package.json +0 -0
  290. /package/{es → src}/SuperTable2/SuperTable2.less +0 -0
  291. /package/{es → src}/SuperTable2/package.json +0 -0
  292. /package/{es → src}/SuperTable3/FilterDropDown.less +0 -0
  293. /package/{es → src}/SuperTable3/SuperTable.less +0 -0
  294. /package/{es → src}/SuperTable3/package.json +0 -0
  295. /package/{es → src}/SuperToolbar/SuperToolbar.less +0 -0
  296. /package/{es → src}/SuperToolbar/package.json +0 -0
  297. /package/{es → src}/SuperUpload/SuperUpload.less +0 -0
  298. /package/{es → src}/SuperUpload/package.json +0 -0
  299. /package/{es → src}/Title/Title.less +0 -0
  300. /package/{es → src}/Title/package.json +0 -0
  301. /package/{es → src}/Viewer/Viewer.less +0 -0
  302. /package/{es → src}/Viewer/imgView.less +0 -0
  303. /package/{es → src}/Viewer/package.json +0 -0
  304. /package/{es → src}/WingBlank/WingBlank.less +0 -0
  305. /package/{es → src}/WingBlank/package.json +0 -0
  306. /package/{es → src}/adjust.less +0 -0
  307. /package/{es → src}/style.less +0 -0
  308. /package/{es → src}/variables.less +0 -0
@@ -1,682 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
3
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
4
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
- import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
- import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
- import _Row from "antd/es/row";
10
- import _Col from "antd/es/col";
11
- import _extends from "@babel/runtime-corejs3/helpers/extends";
12
- import _Tooltip from "antd/es/tooltip";
13
- import _Icon from "antd/es/icon";
14
- import _Checkbox from "antd/es/checkbox";
15
- import _typeof from "@babel/runtime-corejs3/helpers/typeof";
16
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
17
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
18
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
19
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
20
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
21
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
22
- import _Form from "antd/es/form";
23
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
24
- import _Array$isArray from "@babel/runtime-corejs3/core-js-stable/array/is-array";
25
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
26
- import _someInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/some";
27
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
28
- import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
29
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
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; }
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; })(); }
34
- import React from 'react';
35
- import PropTypes from 'prop-types';
36
- import ReactDOM from 'react-dom';
37
- import helper from '../helper';
38
- import Control, { getTitle, makeString } from '../Control';
39
- import variables from '../variables';
40
- var FormItem = _Form.Item;
41
- var defaultSize = 'large';
42
- var defaultColNum = 4;
43
- var TYPE = ['readonly', 'text', 'search', 'searchText', 'select', 'selectText', 'radioGroup', 'number', 'date', 'textArea', 'password', 'editor', 'selectWriting', 'selectSearch', 'empty', 'captcha', 'area', 'uploadImg', 'cascader', 'checkbox', 'treeSelect'];
44
-
45
- /**
46
- * key:[必须],用于唯一标识该Form下的一个表单元素
47
- * title:[必须],表单元素的标签
48
- * type:[必须],表单元素类型
49
- * required: [可选],是否为必填项
50
- * options: [可选],对象数组(type为readonly,radio,search, searchText,select, selectText时有效)
51
- * span: [可选],占据的列数,默认为1
52
- * showAdd: [可选],是否显示+号,点击+号会触发onAdd事件,默认为false
53
- * rule: [可选],用于设置校验规则
54
- */
55
- var ControlType = {
56
- key: PropTypes.string.isRequired,
57
- title: PropTypes.string,
58
- type: PropTypes.oneOf(TYPE).isRequired,
59
- required: PropTypes.bool,
60
- options: PropTypes.array,
61
- span: PropTypes.number,
62
- onCheckItem: PropTypes.any,
63
- showAdd: PropTypes.any,
64
- rule: PropTypes.object,
65
- props: PropTypes.object
66
- };
67
- var Controlled = /*#__PURE__*/function (_React$Component) {
68
- function Controlled(props) {
69
- var _this;
70
- _classCallCheck(this, Controlled);
71
- _this = _callSuper(this, Controlled, [props]);
72
- _defineProperty(_this, "onChange", function (value) {
73
- var onChange = _this.props.onChange;
74
- _this.setState({
75
- value: value
76
- });
77
- onChange && onChange(value);
78
- });
79
- _this.state = {
80
- value: props.value
81
- };
82
- return _this;
83
- }
84
- _inherits(Controlled, _React$Component);
85
- return _createClass(Controlled, [{
86
- key: "componentWillReceiveProps",
87
- value: function componentWillReceiveProps(nextProps) {
88
- if (this.props.value !== nextProps.value) {
89
- this.setState({
90
- value: nextProps.value
91
- });
92
- }
93
- }
94
- }, {
95
- key: "render",
96
- value: function render() {
97
- var props = _objectSpread(_objectSpread({}, this.props), {}, {
98
- size: 'large',
99
- value: this.state.value,
100
- onChange: this.onChange
101
- });
102
- return /*#__PURE__*/React.createElement(Control, props);
103
- }
104
- }]);
105
- }(React.Component);
106
- /**
107
- * colNum:[可选],表单的列数,默认为4
108
- * readonly: [可选],为true时,所有表单元素都是只读的; 为字符串数组时,用于指定key的表单元素是只读的
109
- * hideControls: [可选],指定key的表单元素被隐藏
110
- * options: [可选],键值对,值与ControlType中options作用相同,但优先级更高
111
- * onChange:内容改变时触发,原型为func(key, value)
112
- * onSearch:搜索框中用户输入时触发,原型为func(key, title, control)
113
- * onAdd: 点击+号时触发,原型为func(key)
114
- * checkable:是否显示checkbox选择框
115
- * onOpenChange:控制日期框显示隐藏回调func(key, open)
116
- * onAreaSearch:联级选择器触发,原型为func(key - 当前联级key, title - 输入值, parentKey - 主体联级key)
117
- * onFileChange:上传组件触发,原型为func(key,{fileList, fileDeleteList})
118
- */
119
- var SuperForm2 = /*#__PURE__*/function (_React$Component2) {
120
- function SuperForm2() {
121
- var _context;
122
- var _this2;
123
- _classCallCheck(this, SuperForm2);
124
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
125
- args[_key] = arguments[_key];
126
- }
127
- _this2 = _callSuper(this, SuperForm2, _concatInstanceProperty(_context = []).call(_context, args));
128
- _defineProperty(_this2, "onAdd", function (key, title) {
129
- var onAdd = _this2.props.onAdd;
130
- onAdd && onAdd(key, title);
131
- });
132
- _defineProperty(_this2, "onFileChange", function (_ref, file) {
133
- var key = _ref.key;
134
- var onFileChange = _this2.props.onFileChange;
135
- onFileChange && onFileChange(key, file);
136
- });
137
- _defineProperty(_this2, "onChange", function (key, value) {
138
- var onChange = _this2.props.onChange;
139
- if (onChange) {
140
- _this2.onExitValid(key);
141
- onChange(key, value);
142
- }
143
- });
144
- _defineProperty(_this2, "onGetCode", function (key, value) {
145
- var onGetCode = _this2.props.onGetCode;
146
- onGetCode && onGetCode();
147
- });
148
- _defineProperty(_this2, "onBlur", function (key, value) {
149
- var onChange = _this2.props.onChange;
150
- if (onChange) {
151
- _this2.onExitValid(key);
152
- onChange(key, value);
153
- }
154
- });
155
- _defineProperty(_this2, "onExitValid", function (key, value) {
156
- if (key === _this2.validKey) {
157
- _this2.validKey = '';
158
- _this2.props.onExitValid();
159
- }
160
- _this2.props.onChangeOperate && _this2.props.onChangeOperate(key, value);
161
- });
162
- // 动态生成getValidState方法
163
- _defineProperty(_this2, "initValidState", function () {
164
- var _this2$props = _this2.props,
165
- value = _this2$props.value,
166
- valid = _this2$props.valid;
167
- var invalid = function invalid() {
168
- return null;
169
- };
170
- var _valid = function _valid(_ref2) {
171
- var key = _ref2.key,
172
- required = _ref2.required;
173
- if (required) {
174
- if (!value || helper.isEmpty2(value[key]) || !_Array$isArray(value[key]) && _typeof(value[key]) === 'object' && helper.isEmpty(value[key].value)) {
175
- _this2.getValidState = invalid;
176
- _this2.validKey = key;
177
- return 'error';
178
- }
179
- }
180
- return null;
181
- };
182
- _this2.getValidState = valid ? _valid : invalid;
183
- });
184
- _defineProperty(_this2, "validDate", function (_ref3) {
185
- var key = _ref3.key,
186
- type = _ref3.type;
187
- return function (date) {
188
- var _this2$props$value = _this2.props.value,
189
- value = _this2$props$value === void 0 ? {} : _this2$props$value;
190
- if (!date || !value[key]) {
191
- return false;
192
- } else {
193
- if (type === '>') {
194
- return date.format('YYYY-MM-DD') < value[key];
195
- } else if (type === '<') {
196
- return date.format('YYYY-MM-DD') > value[key];
197
- } else {
198
- return false;
199
- }
200
- }
201
- };
202
- });
203
- _defineProperty(_this2, "getPopupContainer", function () {
204
- var container = _this2.props.container;
205
- if (typeof container === 'undefined') {
206
- return ReactDOM.findDOMNode(_this2);
207
- } else if (typeof container === 'boolean') {
208
- return document.body;
209
- } else {
210
- return ReactDOM.findDOMNode(container);
211
- }
212
- });
213
- _defineProperty(_this2, "getMaxWidth", function () {
214
- var _this2$props$colNum = _this2.props.colNum,
215
- colNum = _this2$props$colNum === void 0 ? defaultColNum : _this2$props$colNum;
216
- return colNum * 1200;
217
- });
218
- _defineProperty(_this2, "getContainer", function () {
219
- return _this2.props.getContainer;
220
- });
221
- _defineProperty(_this2, "getControls", function () {
222
- var _this2$props2 = _this2.props,
223
- hideControls = _this2$props2.hideControls,
224
- controls = _this2$props2.controls;
225
- if (!hideControls) {
226
- return controls;
227
- } else {
228
- return _filterInstanceProperty(controls).call(controls, function (control) {
229
- return !_someInstanceProperty(hideControls).call(hideControls, function (key) {
230
- return control.key === key;
231
- });
232
- });
233
- }
234
- });
235
- _defineProperty(_this2, "getType", function (_ref4) {
236
- var _context2;
237
- var key = _ref4.key,
238
- type = _ref4.type;
239
- var readonly = _this2.props.readonly;
240
- if (_includesInstanceProperty(_context2 = ['area', 'uploadImg']).call(_context2, type)) {
241
- return type;
242
- } else if (!readonly) {
243
- return type;
244
- } else if (readonly === true) {
245
- return 'readonly';
246
- } else if (_Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
247
- return readonlyKey === key;
248
- })) {
249
- return 'readonly';
250
- } else {
251
- return type;
252
- }
253
- });
254
- _defineProperty(_this2, "specialProps", function (type, _ref5) {
255
- var key = _ref5.key,
256
- _ref5$props = _ref5.props,
257
- props = _ref5$props === void 0 ? {} : _ref5$props,
258
- originType = _ref5.type;
259
- if (type === 'readonly') {
260
- if (originType === 'textArea') {
261
- var _context3;
262
- return {
263
- type: 'textArea',
264
- readonly: true,
265
- onBlur: _bindInstanceProperty(_context3 = _this2.onExitValid).call(_context3, _this2, key)
266
- };
267
- } else if (originType === 'uploadImg') {
268
- var _context4;
269
- var commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
270
- return _objectSpread(_objectSpread(_objectSpread({}, props), commonProps), {}, {
271
- readonly: true,
272
- onBlur: _bindInstanceProperty(_context4 = _this2.onExitValid).call(_context4, _this2, key)
273
- });
274
- } else {
275
- var _context5;
276
- return {
277
- onBlur: _bindInstanceProperty(_context5 = _this2.onExitValid).call(_context5, _this2, key)
278
- };
279
- }
280
- } else if (type === 'text' || type === 'textArea') {
281
- var _context6, _context7;
282
- return _objectSpread(_objectSpread({}, props), {}, {
283
- onChange: _bindInstanceProperty(_context6 = _this2.onExitValid).call(_context6, _this2, key),
284
- onBlur: _bindInstanceProperty(_context7 = _this2.onChange).call(_context7, _this2, key)
285
- });
286
- } else if (type === 'date') {
287
- var _context8, _context9;
288
- var propsObj = _objectSpread(_objectSpread({}, props), {}, {
289
- onChange: _bindInstanceProperty(_context8 = _this2.onBlur).call(_context8, _this2, key),
290
- onBlur: _bindInstanceProperty(_context9 = _this2.onExitValid).call(_context9, _this2, key)
291
- });
292
- if (_this2.props.onOpenChange && typeof _this2.props.onOpenChange === 'function') {
293
- var _context0;
294
- propsObj.onOpenChange = _bindInstanceProperty(_context0 = _this2.props.onOpenChange).call(_context0, _this2, key);
295
- }
296
- return propsObj;
297
- } else if (type === 'captcha') {
298
- var _context1, _context10, _context11;
299
- return _objectSpread(_objectSpread({}, props), {}, {
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)
303
- });
304
- } else if (type === 'area') {
305
- var _context12, _context13;
306
- return _objectSpread(_objectSpread({}, props), {}, {
307
- onChange: _bindInstanceProperty(_context12 = _this2.onBlur).call(_context12, _this2, key),
308
- onBlur: _bindInstanceProperty(_context13 = _this2.onExitValid).call(_context13, _this2, key),
309
- onAreaSearch: _this2.props.onAreaSearch
310
- });
311
- } else if (type === 'uploadImg') {
312
- var _context14, _context15;
313
- var _commonProps = _this2.props.buildSuperUploadProps ? _this2.props.buildSuperUploadProps() : {};
314
- return _objectSpread(_objectSpread(_objectSpread({}, props), _commonProps), {}, {
315
- onChange: _bindInstanceProperty(_context14 = _this2.onBlur).call(_context14, _this2, key),
316
- onBlur: _bindInstanceProperty(_context15 = _this2.onExitValid).call(_context15, _this2, key)
317
- });
318
- } else if (type === 'double') {
319
- return props;
320
- } else {
321
- var _context16, _context17;
322
- return _objectSpread(_objectSpread({}, props), {}, {
323
- onChange: _bindInstanceProperty(_context16 = _this2.onBlur).call(_context16, _this2, key),
324
- onBlur: _bindInstanceProperty(_context17 = _this2.onExitValid).call(_context17, _this2, key)
325
- });
326
- }
327
- });
328
- _defineProperty(_this2, "getControlProps", function (control, status) {
329
- var _this2$props3 = _this2.props,
330
- _this2$props3$value = _this2$props3.value,
331
- value = _this2$props3$value === void 0 ? {} : _this2$props3$value,
332
- readonly = _this2$props3.readonly;
333
- var type = _this2.getType(control);
334
- var props = _this2.specialProps(type, control);
335
- return _objectSpread(_objectSpread({
336
- autoFocus: !!status,
337
- type: type
338
- }, props), {}, {
339
- size: defaultSize,
340
- value: makeString(value[control.key])
341
- });
342
- });
343
- _defineProperty(_this2, "getOptions", function (key, options) {
344
- var higher = _this2.props.options || {};
345
- return higher[key] || options;
346
- });
347
- _defineProperty(_this2, "toEmpty", function (props) {});
348
- _defineProperty(_this2, "toText", function (props) {
349
- return /*#__PURE__*/React.createElement(Controlled, props);
350
- });
351
- _defineProperty(_this2, "toPassword", function (props) {
352
- return /*#__PURE__*/React.createElement(Controlled, props);
353
- });
354
- _defineProperty(_this2, "toEditor", function (props, control) {
355
- props.inputKey = control.key;
356
- return /*#__PURE__*/React.createElement(Controlled, props);
357
- });
358
- _defineProperty(_this2, "toSelectWriting", function (props, control) {
359
- return /*#__PURE__*/React.createElement(Controlled, props);
360
- });
361
- _defineProperty(_this2, "toTextArea", function (props, control) {
362
- if (control.allFullFather) {
363
- props.rows = control.rows;
364
- props.maxLength = control.maxLength;
365
- props.style = {
366
- 'resize': 'none'
367
- };
368
- } else {
369
- props.autoSize = {
370
- minRows: 1,
371
- maxRows: 5
372
- };
373
- }
374
- return /*#__PURE__*/React.createElement(Controlled, props);
375
- });
376
- _defineProperty(_this2, "toNumber", function (props) {
377
- props.defaultValue = props.value;
378
- delete props.value;
379
- return /*#__PURE__*/React.createElement(Control, props);
380
- });
381
- _defineProperty(_this2, "toDoubleInput", function (props, control, cc) {
382
- var _context18, _context19;
383
- props.defaultValue = props.value;
384
- props.doubleKey = props.key;
385
- props.doubleValue = helper.getObject(cc, props.key);
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]);
388
- delete props.value;
389
- return /*#__PURE__*/React.createElement(Control, props);
390
- });
391
- _defineProperty(_this2, "toSelect", function (props, _ref6) {
392
- var options = _ref6.options,
393
- key = _ref6.key;
394
- props.getPopupContainer = _this2.getPopupContainer;
395
- props.options = _this2.getOptions(key, options);
396
- props.dropdownMatchSelectWidth = false;
397
- return /*#__PURE__*/React.createElement(Control, props);
398
- });
399
- _defineProperty(_this2, "toTreeSelect", function (props, filter) {
400
- var container = _this2.getContainer();
401
- container && (props.getPopupContainer = container);
402
- props.options = _this2.getOptions(filter);
403
- props.onSearch = _this2.createSearchEvent(filter);
404
- props.placeholder = filter.placeholder || '';
405
- return /*#__PURE__*/React.createElement(Control, props);
406
- });
407
- _defineProperty(_this2, "createSearchEvent", function (control) {
408
- if (_this2.props.onSearch) {
409
- return function (value) {
410
- return _this2.props.onSearch(control.key, value, control);
411
- };
412
- } else {
413
- return null;
414
- }
415
- });
416
- _defineProperty(_this2, "createGetCodeEvent", function (control) {
417
- if (_this2.props.onGetCode) {
418
- return function (value) {
419
- return _this2.props.onGetCode(control.key, value, control);
420
- };
421
- } else {
422
- return null;
423
- }
424
- });
425
- _defineProperty(_this2, "toSearch", function (props, control) {
426
- props.getPopupContainer = _this2.getPopupContainer;
427
- props.options = _this2.getOptions(control.key, control.options);
428
- props.onSearch = _this2.createSearchEvent(control);
429
- props.dropdownMatchSelectWidth = false;
430
- props.size = 'large';
431
- return /*#__PURE__*/React.createElement(Control, props);
432
- });
433
- _defineProperty(_this2, "toDate", function (props, _ref7) {
434
- var rule = _ref7.rule;
435
- props.getCalendarContainer = _this2.getPopupContainer;
436
- props.style = {
437
- width: '100%'
438
- };
439
- rule && (props.disabledDate = _this2.validDate(rule));
440
- return /*#__PURE__*/React.createElement(Control, props);
441
- });
442
- _defineProperty(_this2, "toRadioGroup", function (props, _ref8) {
443
- var key = _ref8.key,
444
- options = _ref8.options;
445
- props.options = _this2.getOptions(key, options);
446
- return /*#__PURE__*/React.createElement(Control, props);
447
- });
448
- _defineProperty(_this2, "captcha", function (props, control) {
449
- props.onGetCode = _this2.props.onGetCode;
450
- return /*#__PURE__*/React.createElement(Control, props);
451
- });
452
- _defineProperty(_this2, "toReadonly", function (props, _ref9) {
453
- var options = _ref9.options,
454
- key = _ref9.key;
455
- props.value = getTitle(props.value, _this2.getOptions(key, options));
456
- return /*#__PURE__*/React.createElement(Control, props);
457
- });
458
- _defineProperty(_this2, "selectSearch", function (props, control) {
459
- props.getPopupContainer = _this2.getPopupContainer;
460
- props.options = _this2.getOptions(control.key, control.options);
461
- props.onSearch = _this2.createSearchEvent(control);
462
- props.dropdownMatchSelectWidth = false;
463
- return /*#__PURE__*/React.createElement(Control, props);
464
- });
465
- _defineProperty(_this2, "area", function (props, _ref0) {
466
- var key = _ref0.key,
467
- options = _ref0.options;
468
- var readonly = _this2.props.readonly;
469
- props.parentKey = key;
470
- props.options = _this2.getOptions(key, options);
471
- props.dropdownMatchSelectWidth = false;
472
- props.readonly = readonly === true || _Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
473
- return readonlyKey === key;
474
- }) ? true : false;
475
- return /*#__PURE__*/React.createElement(Control, props);
476
- });
477
- _defineProperty(_this2, "uploadImg", function (props, control) {
478
- var _context20;
479
- var readonly = _this2.props.readonly;
480
- props.required = control.required || false;
481
- props.onFileChange = _bindInstanceProperty(_context20 = _this2.onFileChange).call(_context20, _this2, control);
482
- props.readonly = readonly === true || _Array$isArray(readonly) && _someInstanceProperty(readonly).call(readonly, function (readonlyKey) {
483
- return readonlyKey === control.key;
484
- }) ? true : false;
485
- return /*#__PURE__*/React.createElement(Control, props);
486
- });
487
- _defineProperty(_this2, "toCascader", function (props, control) {
488
- var container = _this2.getContainer();
489
- container && (props.getPopupContainer = container);
490
- props.options = control.options || [];
491
- props.onSearch = _this2.createSearchEvent(control);
492
- props.placeholder = props.placeholder || '';
493
- props.loadData = _this2.createSearchEvent(control);
494
- return /*#__PURE__*/React.createElement(Control, props);
495
- });
496
- _defineProperty(_this2, "toCheckbox", function (props, control) {
497
- var _context21;
498
- var options = control.options || [];
499
- return /*#__PURE__*/React.createElement(_Checkbox.Group, {
500
- options: options,
501
- onChange: _bindInstanceProperty(_context21 = _this2.onBlur).call(_context21, _this2, control.key),
502
- value: _this2.props.value[control.key]
503
- });
504
- });
505
- _defineProperty(_this2, "toControl", function (props, control) {
506
- switch (props.type) {
507
- case 'readonly':
508
- return _this2.toReadonly(props, control);
509
- case 'double':
510
- return _this2.toDoubleInput(props, control, _this2.props.value);
511
- case 'text':
512
- return _this2.toText(props, control);
513
- case 'number':
514
- return _this2.toNumber(props, control);
515
- case 'select':
516
- case 'selectText':
517
- return _this2.toSelect(props, control);
518
- case 'search':
519
- case 'searchText':
520
- return _this2.toSearch(props, control);
521
- case 'date':
522
- return _this2.toDate(props, control);
523
- case 'radioGroup':
524
- return _this2.toRadioGroup(props, control);
525
- case 'textArea':
526
- return _this2.toTextArea(props, control);
527
- case 'password':
528
- return _this2.toPassword(props, control);
529
- case 'editor':
530
- return _this2.toEditor(props, control);
531
- case 'selectWriting':
532
- return _this2.toSelectWriting(props, control);
533
- case 'selectSearch':
534
- return _this2.selectSearch(props, control);
535
- case 'empty':
536
- return _this2.toEmpty(props, control);
537
- case 'captcha':
538
- return _this2.captcha(props, control);
539
- case 'area':
540
- return _this2.area(props, control);
541
- case 'uploadImg':
542
- return _this2.uploadImg(props, control);
543
- case 'cascader':
544
- return _this2.toCascader(props, control);
545
- case 'treeSelect':
546
- return _this2.toTreeSelect(props, control);
547
- case 'checkbox':
548
- return _this2.toCheckbox(props, control);
549
- default:
550
- return 'type error';
551
- }
552
- });
553
- _defineProperty(_this2, "toLabel", function (_ref1, type) {
554
- var title = _ref1.title,
555
- showAdd = _ref1.showAdd,
556
- key = _ref1.key,
557
- showInfo = _ref1.showInfo,
558
- showInfoTitle = _ref1.showInfoTitle;
559
- if (showAdd && type !== 'readonly') {
560
- var _context22;
561
- var onClick = _bindInstanceProperty(_context22 = _this2.onAdd).call(_context22, _this2, key, title);
562
- return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Icon, {
563
- role: "add",
564
- type: "plus-circle-o",
565
- onClick: onClick
566
- }));
567
- } else if (showInfo) {
568
- return /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(_Tooltip, {
569
- title: showInfoTitle
570
- }, /*#__PURE__*/React.createElement(_Icon, {
571
- type: "info-circle"
572
- })));
573
- } else {
574
- return title;
575
- }
576
- });
577
- _defineProperty(_this2, "toCol", function (span, control) {
578
- var factor = control.span || 1;
579
- var status = _this2.getValidState(control);
580
- var controlProps = _this2.getControlProps(control, status);
581
- var itemProps = {
582
- label: _this2.toLabel(control, controlProps.type),
583
- required: control.required,
584
- validateStatus: status
585
- };
586
- var _this2$props4 = _this2.props,
587
- checkable = _this2$props4.checkable,
588
- onCheckItem = _this2$props4.onCheckItem;
589
- return control.type !== 'empty' ? /*#__PURE__*/React.createElement(_Col, {
590
- span: span * factor,
591
- key: control.key
592
- }, checkable && /*#__PURE__*/React.createElement(_Checkbox, {
593
- className: variables('SuperForm2').checkbox,
594
- onChange: _bindInstanceProperty(onCheckItem).call(onCheckItem, _this2, control),
595
- checked: control.checked
596
- }), /*#__PURE__*/React.createElement(FormItem, _extends({}, itemProps, {
597
- className: checkable ? variables('SuperForm2').formItemWithCheckbox : '',
598
- labelCol: {
599
- xs: {
600
- span: 24
601
- },
602
- sm: {
603
- span: 8
604
- }
605
- },
606
- wrapperCol: {
607
- xs: {
608
- span: 24
609
- },
610
- sm: {
611
- span: 16
612
- }
613
- }
614
- }), _this2.toControl(controlProps, control))) : /*#__PURE__*/React.createElement(_Col, {
615
- span: span * factor,
616
- key: control.key,
617
- style: {
618
- height: '44px'
619
- }
620
- });
621
- });
622
- _defineProperty(_this2, "toCols", function () {
623
- var _context23;
624
- var _this2$props5 = _this2.props,
625
- _this2$props5$colNum = _this2$props5.colNum,
626
- colNum = _this2$props5$colNum === void 0 ? defaultColNum : _this2$props5$colNum,
627
- allFullFather = _this2$props5.allFullFather;
628
- if (allFullFather) {
629
- colNum = 1;
630
- }
631
- var span = 24 / colNum;
632
- return _mapInstanceProperty(_context23 = _this2.getControls()).call(_context23, function (control) {
633
- if (allFullFather) {
634
- control.allFullFather = allFullFather;
635
- }
636
- return _this2.toCol(span, control);
637
- });
638
- });
639
- return _this2;
640
- }
641
- _inherits(SuperForm2, _React$Component2);
642
- return _createClass(SuperForm2, [{
643
- key: "render",
644
- value: function render() {
645
- this.initValidState();
646
- var _this$props$layout = this.props.layout,
647
- layout = _this$props$layout === void 0 ? 'horizontal' : _this$props$layout;
648
- return /*#__PURE__*/React.createElement("div", {
649
- className: variables('SuperForm2')
650
- }, /*#__PURE__*/React.createElement(_Form, {
651
- layout: layout,
652
- style: {
653
- maxWidth: this.props.allFullFather ? '100%' : this.getMaxWidth()
654
- }
655
- }, /*#__PURE__*/React.createElement(_Row, {
656
- gutter: 20
657
- }, this.toCols())));
658
- }
659
- }]);
660
- }(React.Component);
661
- _defineProperty(SuperForm2, "propTypes", {
662
- controls: PropTypes.arrayOf(PropTypes.shape(ControlType)).isRequired,
663
- value: PropTypes.object,
664
- colNum: PropTypes.number,
665
- valid: PropTypes.bool,
666
- readonly: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
667
- hideControls: PropTypes.array,
668
- options: PropTypes.object,
669
- onChange: PropTypes.func,
670
- onSearch: PropTypes.func,
671
- onExitValid: PropTypes.func,
672
- onAdd: PropTypes.func,
673
- checkable: PropTypes.bool,
674
- onOpenChange: PropTypes.func,
675
- onGetCode: PropTypes.func,
676
- onFileChange: PropTypes.func,
677
- onAreaSearch: PropTypes.func,
678
- buildSuperUploadProps: PropTypes.func,
679
- //构建type===uploadImg时,SuperUpload组件需要的公共属性函数,已在项目公共文件state.js中提供,可直接引用
680
- layout: PropTypes.string
681
- });
682
- export default SuperForm2;