cloud-b2b 1.1.58 → 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 -141
  68. package/es/Card/Card.js +0 -19
  69. package/es/CodeInput/CodeInput.js +0 -123
  70. package/es/Control/Control.js +0 -444
  71. package/es/Control/event.js +0 -43
  72. package/es/Enhance/Dialogs.js +0 -52
  73. package/es/Enhance/Loading.js +0 -131
  74. package/es/Header/Header.js +0 -162
  75. package/es/Header/Vertical.js +0 -106
  76. package/es/ImageView/ImageView.js +0 -100
  77. package/es/Indent/Indent.js +0 -19
  78. package/es/InpurCascader/InputCascader.js +0 -117
  79. package/es/InputEditor/InputEditor.js +0 -173
  80. package/es/InputSearch/InputSearch.js +0 -266
  81. package/es/InputSelect/InputSelect.js +0 -160
  82. package/es/InputTreeSelect/InputTreeSelect.js +0 -121
  83. package/es/InputWriting/InputWriting.js +0 -85
  84. package/es/Layout/Layout.js +0 -201
  85. package/es/LayoutLink/LayoutLink.js +0 -73
  86. package/es/Link/Link.js +0 -85
  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 -200
  91. package/es/Search/Search.js +0 -497
  92. package/es/Sidebar/Sidebar.js +0 -144
  93. package/es/Sidebar2/Sidebar.js +0 -165
  94. package/es/SuperForm/SuperForm.js +0 -598
  95. package/es/SuperForm2/SuperForm.js +0 -687
  96. package/es/SuperIcon/SuperIcon.js +0 -27
  97. package/es/SuperPagination/SuperPagination.js +0 -109
  98. package/es/SuperTab/SuperTab.js +0 -107
  99. package/es/SuperTab2/SuperTab2.js +0 -145
  100. package/es/SuperTable/DragSortRow.js +0 -97
  101. package/es/SuperTable/FilterDropDown.js +0 -164
  102. package/es/SuperTable/SuperTable.js +0 -808
  103. package/es/SuperTable/fixed.js +0 -34
  104. package/es/SuperTable2/SuperTable2.js +0 -926
  105. package/es/SuperTable2/SuperTableCell.js +0 -225
  106. package/es/SuperTable3/FilterDropDown.js +0 -164
  107. package/es/SuperTable3/SuperTable.js +0 -665
  108. package/es/SuperTable3/fixed.js +0 -34
  109. package/es/SuperToolbar/SuperToolbar.js +0 -195
  110. package/es/SuperUpload/SuperUpload.js +0 -356
  111. package/es/Title/Title.js +0 -33
  112. package/es/Viewer/ImageViews.js +0 -258
  113. package/es/Viewer/Viewer.js +0 -122
  114. package/es/WingBlank/WingBlank.js +0 -16
  115. package/es/helper.js +0 -240
  116. package/es/index.js +0 -37
  117. package/es/variables.js +0 -6
  118. package/lib/Area/Area.js +0 -149
  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 -131
  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 -60
  128. package/lib/Enhance/Loading.js +0 -138
  129. package/lib/Enhance/index.js +0 -25
  130. package/lib/Enhance/package.json +0 -6
  131. package/lib/Header/Header.js +0 -169
  132. package/lib/Header/Header.less +0 -95
  133. package/lib/Header/Vertical.js +0 -114
  134. package/lib/Header/Vertical.less +0 -60
  135. package/lib/Header/package.json +0 -6
  136. package/lib/ImageView/ImageView.js +0 -108
  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 -124
  142. package/lib/InpurCascader/package.json +0 -6
  143. package/lib/InputEditor/InputEditor.js +0 -181
  144. package/lib/InputEditor/inputEditor.less +0 -8
  145. package/lib/InputEditor/package.json +0 -6
  146. package/lib/InputSearch/InputSearch.js +0 -274
  147. package/lib/InputSearch/package.json +0 -6
  148. package/lib/InputSelect/InputSelect.js +0 -168
  149. package/lib/InputSelect/package.json +0 -6
  150. package/lib/InputTreeSelect/InputTreeSelect.js +0 -128
  151. package/lib/InputTreeSelect/package.json +0 -6
  152. package/lib/InputWriting/InputWriting.js +0 -93
  153. package/lib/InputWriting/package.json +0 -6
  154. package/lib/Layout/Layout.js +0 -209
  155. package/lib/Layout/Layout.less +0 -28
  156. package/lib/Layout/package.json +0 -6
  157. package/lib/LayoutLink/LayoutLink.js +0 -86
  158. package/lib/LayoutLink/LayoutLink.less +0 -53
  159. package/lib/LayoutLink/package.json +0 -6
  160. package/lib/Link/Link.js +0 -93
  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 -208
  173. package/lib/NumberInput/package.json +0 -6
  174. package/lib/Search/Search.js +0 -510
  175. package/lib/Sidebar/Sidebar.js +0 -152
  176. package/lib/Sidebar/Sidebar.less +0 -78
  177. package/lib/Sidebar/package.json +0 -6
  178. package/lib/Sidebar2/Sidebar.js +0 -173
  179. package/lib/Sidebar2/Sidebar.less +0 -153
  180. package/lib/Sidebar2/package.json +0 -6
  181. package/lib/SuperForm/SuperForm.js +0 -610
  182. package/lib/SuperForm/SuperForm.less +0 -52
  183. package/lib/SuperForm/package.json +0 -6
  184. package/lib/SuperForm2/SuperForm.js +0 -699
  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 -117
  190. package/lib/SuperPagination/package.json +0 -6
  191. package/lib/SuperTab/SuperTab.js +0 -115
  192. package/lib/SuperTab/SuperTab.less +0 -43
  193. package/lib/SuperTab/package.json +0 -6
  194. package/lib/SuperTab2/SuperTab2.js +0 -153
  195. package/lib/SuperTab2/SuperTab2.less +0 -18
  196. package/lib/SuperTab2/package.json +0 -6
  197. package/lib/SuperTable/DragSortRow.js +0 -105
  198. package/lib/SuperTable/DragSortRow.less +0 -17
  199. package/lib/SuperTable/FilterDropDown.js +0 -172
  200. package/lib/SuperTable/FilterDropDown.less +0 -30
  201. package/lib/SuperTable/SuperTable.js +0 -816
  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 -939
  206. package/lib/SuperTable2/SuperTable2.less +0 -118
  207. package/lib/SuperTable2/SuperTableCell.js +0 -230
  208. package/lib/SuperTable2/package.json +0 -6
  209. package/lib/SuperTable3/FilterDropDown.js +0 -172
  210. package/lib/SuperTable3/FilterDropDown.less +0 -29
  211. package/lib/SuperTable3/SuperTable.js +0 -673
  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 -203
  216. package/lib/SuperToolbar/SuperToolbar.less +0 -17
  217. package/lib/SuperToolbar/package.json +0 -6
  218. package/lib/SuperUpload/SuperUpload.js +0 -368
  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 -266
  225. package/lib/Viewer/Viewer.js +0 -130
  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 -246
  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,27 +0,0 @@
1
- import _Icon from "antd/es/icon";
2
- import _extends from "@babel/runtime-corejs3/helpers/extends";
3
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
4
- var _excluded = ["type", "style"];
5
- import React from 'react';
6
- var SuperIcon = function SuperIcon(_ref) {
7
- var type = _ref.type,
8
- _ref$style = _ref.style,
9
- style = _ref$style === void 0 ? {} : _ref$style,
10
- props = _objectWithoutProperties(_ref, _excluded);
11
- if (!type) {
12
- return /*#__PURE__*/React.createElement(_Icon, _extends({
13
- style: style
14
- }, props));
15
- } else if (type.substring(0, 4) !== 'pld-') {
16
- return /*#__PURE__*/React.createElement(_Icon, _extends({
17
- type: type,
18
- style: style
19
- }, props));
20
- } else {
21
- return /*#__PURE__*/React.createElement("i", {
22
- className: "pldicon anticon anticon-".concat(type),
23
- style: style
24
- });
25
- }
26
- };
27
- export default SuperIcon;
@@ -1,109 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Pagination from "antd/es/pagination";
3
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
- import _Object$assign from "@babel/runtime-corejs3/core-js-stable/object/assign";
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
16
- /**
17
- * maxRecords: 最大记录数
18
- * selRecords: [可选]已选记录条数
19
- * currentPage:当前页码
20
- * pageSize:页面大小
21
- * align: 分页组件的对齐方式,默认居右
22
- * pageSizeType: 字符串数组,页面大小规格
23
- * description:字符串描述,类似'共有{maxRecords}条记录'
24
- * onPageChange:跳转到新的一页时触发,原型func(pageNumber)
25
- * onPageSizeChange: 页大小改变时触发,原型func(pageSize, pageNumber)
26
- */
27
- var SuperPagination = /*#__PURE__*/function (_React$Component) {
28
- _inherits(SuperPagination, _React$Component);
29
- var _super = _createSuper(SuperPagination);
30
- function SuperPagination() {
31
- var _context;
32
- var _this;
33
- _classCallCheck(this, SuperPagination);
34
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
35
- args[_key] = arguments[_key];
36
- }
37
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
38
- _defineProperty(_assertThisInitialized(_this), "onChange", function (page) {
39
- var _this$props$callback = _this.props.callback,
40
- callback = _this$props$callback === void 0 ? {} : _this$props$callback;
41
- var onPageNumberChange = _this.props.onPageNumberChange || callback.onPageNumberChange;
42
- onPageNumberChange && onPageNumberChange(page);
43
- });
44
- _defineProperty(_assertThisInitialized(_this), "onShowSizeChange", function (current, size) {
45
- var _this$props$callback2 = _this.props.callback,
46
- callback = _this$props$callback2 === void 0 ? {} : _this$props$callback2;
47
- var onPageSizeChange = _this.props.onPageSizeChange || callback.onPageSizeChange;
48
- onPageSizeChange && onPageSizeChange(size, current || 1);
49
- });
50
- return _this;
51
- }
52
- _createClass(SuperPagination, [{
53
- key: "render",
54
- value: function render() {
55
- var _this$props = this.props,
56
- currentPage = _this$props.currentPage,
57
- maxRecords = _this$props.maxRecords,
58
- pageSize = _this$props.pageSize,
59
- pageSizeType = _this$props.pageSizeType,
60
- align = _this$props.align,
61
- description = _this$props.description,
62
- selRecords = _this$props.selRecords,
63
- _this$props$page = _this$props.page,
64
- page = _this$props$page === void 0 ? {} : _this$props$page,
65
- _this$props$option = _this$props.option,
66
- option = _this$props$option === void 0 ? {} : _this$props$option,
67
- _this$props$style = _this$props.style,
68
- style = _this$props$style === void 0 ? {} : _this$props$style;
69
- var desp = description || (this.props.config || {}).pageDesp || '';
70
- var props = {
71
- current: currentPage || page.currentPage,
72
- total: maxRecords || page.maxRecords,
73
- pageSize: pageSize || page.pageSize,
74
- showSizeChanger: true,
75
- showQuickJumper: true,
76
- pageSizeOptions: pageSizeType || option.pageSizeType || [],
77
- onChange: this.onChange,
78
- onShowSizeChange: this.onShowSizeChange,
79
- showTotal: function showTotal(total) {
80
- return desp.replace('{maxRecords}', total).replace('{selRecords}', selRecords || 0);
81
- },
82
- style: _Object$assign({}, style, {
83
- display: 'inline-block',
84
- textAlign: 'left',
85
- verticalAlign: 'top'
86
- })
87
- };
88
- return /*#__PURE__*/React.createElement("div", {
89
- style: {
90
- textAlign: align || 'right'
91
- }
92
- }, /*#__PURE__*/React.createElement(_Pagination, props));
93
- }
94
- }]);
95
- return SuperPagination;
96
- }(React.Component);
97
- _defineProperty(SuperPagination, "propTypes", {
98
- maxRecords: PropTypes.number,
99
- selRecords: PropTypes.number,
100
- currentPage: PropTypes.number,
101
- pageSize: PropTypes.number,
102
- align: PropTypes.oneOf(['left', 'right', 'center']),
103
- pageSizeType: PropTypes.array,
104
- description: PropTypes.string,
105
- style: PropTypes.object,
106
- onPageNumberChange: PropTypes.func,
107
- onPageSizeChange: PropTypes.func
108
- });
109
- export default SuperPagination;
@@ -1,107 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
9
- import _Tabs from "antd/es/tabs";
10
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
11
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
16
- import variables from '../variables';
17
- var TabPane = _Tabs.TabPane;
18
-
19
- /**
20
- * key: 唯一标识一个tab
21
- * title: 显示在tab上的标题
22
- * close: 为true则显示关闭按钮,默认为true
23
- */
24
- var TabType = {
25
- key: PropTypes.string.isRequired,
26
- title: PropTypes.string.isRequired,
27
- close: PropTypes.bool
28
- };
29
-
30
- /**
31
- * activeKey: 处于活动状态tab的key值
32
- * onTabChange: 切换选项卡时触发,原型为function(key)
33
- * onTabClose: 关闭选项卡时触发,原型为funtion(key)
34
- */
35
- var SuperTab = /*#__PURE__*/function (_React$Component) {
36
- _inherits(SuperTab, _React$Component);
37
- var _super = _createSuper(SuperTab);
38
- function SuperTab() {
39
- var _context;
40
- var _this;
41
- _classCallCheck(this, SuperTab);
42
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
43
- args[_key] = arguments[_key];
44
- }
45
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
46
- _defineProperty(_assertThisInitialized(_this), "getEvent", function (name) {
47
- if (_this.props[name]) {
48
- return _this.props[name];
49
- } else if (_this.props.callback) {
50
- return _this.props.callback[name];
51
- } else {
52
- return null;
53
- }
54
- });
55
- _defineProperty(_assertThisInitialized(_this), "callEvent", function (name, key) {
56
- var onEvent = _this.getEvent(name);
57
- if (onEvent) {
58
- onEvent(key);
59
- }
60
- });
61
- _defineProperty(_assertThisInitialized(_this), "onEdit", function (key, action) {
62
- if (action === 'remove') {
63
- _this.callEvent('onTabClose', key);
64
- }
65
- });
66
- _defineProperty(_assertThisInitialized(_this), "onChange", function (key) {
67
- _this.callEvent('onTabChange', key);
68
- });
69
- _defineProperty(_assertThisInitialized(_this), "toTab", function (_ref) {
70
- var key = _ref.key,
71
- title = _ref.title,
72
- close = _ref.close;
73
- return /*#__PURE__*/React.createElement(TabPane, {
74
- key: key,
75
- tab: title,
76
- closable: close
77
- });
78
- });
79
- _defineProperty(_assertThisInitialized(_this), "getTabsProps", function () {
80
- return {
81
- className: variables('SuperTab'),
82
- activeKey: _this.props.activeKey,
83
- type: 'editable-card',
84
- hideAdd: true,
85
- onEdit: _this.onEdit,
86
- onChange: _this.onChange
87
- };
88
- });
89
- return _this;
90
- }
91
- _createClass(SuperTab, [{
92
- key: "render",
93
- value: function render() {
94
- var _context2;
95
- return /*#__PURE__*/React.createElement(_Tabs, this.getTabsProps(), _mapInstanceProperty(_context2 = this.props.tabs).call(_context2, this.toTab));
96
- }
97
- }]);
98
- return SuperTab;
99
- }(React.Component);
100
- _defineProperty(SuperTab, "propTypes", {
101
- activeKey: PropTypes.string.isRequired,
102
- tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
103
- onTabChange: PropTypes.func,
104
- onTabClose: PropTypes.func
105
- });
106
- _defineProperty(SuperTab, "PROPS", ['activeKey', 'tabs', 'onTabChange', 'onTabClose']);
107
- export default SuperTab;
@@ -1,145 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Dropdown from "antd/es/dropdown";
3
- import _Icon from "antd/es/icon";
4
- import _Tooltip from "antd/es/tooltip";
5
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
6
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
7
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
8
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
9
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
10
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
11
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
12
- import _Menu from "antd/es/menu";
13
- import _Tabs from "antd/es/tabs";
14
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
15
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
16
- import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
17
- 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); }; }
18
- 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; } }
19
- import React from 'react';
20
- import PropTypes from 'prop-types';
21
- import ReactDOM from 'react-dom';
22
- import variables from '../variables';
23
- var TabPane = _Tabs.TabPane;
24
- var MenuItem = _Menu.Item;
25
-
26
- /**
27
- * key: 唯一标识一个tab
28
- * title: 显示在tab上的标题
29
- */
30
- var TabType = {
31
- key: PropTypes.string.isRequired,
32
- title: PropTypes.string.isRequired
33
- };
34
-
35
- /**
36
- * activeKey: 处于活动状态tab的key值
37
- * menu: 是否需要右侧下拉列表,默认false
38
- * onTabChange: 切换选项卡时触发,原型为function(key)
39
- */
40
- var SuperTab2 = /*#__PURE__*/function (_React$Component) {
41
- _inherits(SuperTab2, _React$Component);
42
- var _super = _createSuper(SuperTab2);
43
- function SuperTab2() {
44
- var _context;
45
- var _this;
46
- _classCallCheck(this, SuperTab2);
47
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
- args[_key] = arguments[_key];
49
- }
50
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
51
- _defineProperty(_assertThisInitialized(_this), "onTabChange", function (key) {
52
- var _this$props = _this.props,
53
- onTabChange = _this$props.onTabChange,
54
- _this$props$callback = _this$props.callback,
55
- callback = _this$props$callback === void 0 ? {} : _this$props$callback;
56
- if (onTabChange) {
57
- onTabChange(key);
58
- } else if (callback.onTabChange) {
59
- // callback被废弃,只是为了兼容旧代码而已
60
- callback.onTabChange(key);
61
- }
62
- });
63
- _defineProperty(_assertThisInitialized(_this), "toTab", function (tab) {
64
- return /*#__PURE__*/React.createElement(TabPane, {
65
- key: tab.key,
66
- tab: tab.title
67
- });
68
- });
69
- _defineProperty(_assertThisInitialized(_this), "toMenu", function () {
70
- var _this$props2 = _this.props,
71
- tabs = _this$props2.tabs,
72
- activeKey = _this$props2.activeKey;
73
- return /*#__PURE__*/React.createElement(_Menu, {
74
- style: {
75
- maxHeight: '450px',
76
- overflow: 'auto'
77
- }
78
- }, _mapInstanceProperty(tabs).call(tabs, function (tab) {
79
- var _context2, _context3;
80
- var style = activeKey === tab.key ? {
81
- color: "#2196f3"
82
- } : {};
83
- return tab.tip ? /*#__PURE__*/React.createElement(MenuItem, {
84
- key: tab.key
85
- }, /*#__PURE__*/React.createElement(_Tooltip, {
86
- placement: "leftTop",
87
- title: tab.tip
88
- }, /*#__PURE__*/React.createElement("a", {
89
- onClick: _bindInstanceProperty(_context2 = _this.onTabChange).call(_context2, _assertThisInitialized(_this), tab.key),
90
- style: style
91
- }, tab.title))) : /*#__PURE__*/React.createElement(MenuItem, {
92
- key: tab.key
93
- }, /*#__PURE__*/React.createElement("a", {
94
- onClick: _bindInstanceProperty(_context3 = _this.onTabChange).call(_context3, _assertThisInitialized(_this), tab.key),
95
- style: style
96
- }, tab.title));
97
- }));
98
- });
99
- _defineProperty(_assertThisInitialized(_this), "getPopupContainer", function () {
100
- var container = _this.props.container;
101
- if (typeof container === 'undefined') {
102
- return document.body;
103
- } else {
104
- return ReactDOM.findDOMNode(container);
105
- }
106
- });
107
- _defineProperty(_assertThisInitialized(_this), "toDropdown", function () {
108
- return /*#__PURE__*/React.createElement(_Dropdown, {
109
- overlay: _this.toMenu(),
110
- getPopupContainer: _this.getPopupContainer
111
- }, /*#__PURE__*/React.createElement(_Icon, {
112
- type: "menu-unfold",
113
- style: {
114
- fontSize: 16,
115
- verticalAlign: -2
116
- }
117
- }));
118
- });
119
- return _this;
120
- }
121
- _createClass(SuperTab2, [{
122
- key: "render",
123
- value: function render() {
124
- var _this$props3 = this.props,
125
- tabs = _this$props3.tabs,
126
- activeKey = _this$props3.activeKey,
127
- _this$props3$menu = _this$props3.menu,
128
- menu = _this$props3$menu === void 0 ? false : _this$props3$menu;
129
- return /*#__PURE__*/React.createElement(_Tabs, {
130
- className: variables('SuperTab2'),
131
- activeKey: activeKey,
132
- onChange: this.onTabChange,
133
- tabBarExtraContent: menu && tabs.length > 3 && this.toDropdown()
134
- }, _mapInstanceProperty(tabs).call(tabs, this.toTab));
135
- }
136
- }]);
137
- return SuperTab2;
138
- }(React.Component);
139
- _defineProperty(SuperTab2, "propTypes", {
140
- activeKey: PropTypes.string.isRequired,
141
- tabs: PropTypes.arrayOf(PropTypes.shape(TabType)).isRequired,
142
- menu: PropTypes.bool,
143
- onTabChange: PropTypes.func
144
- });
145
- export default SuperTab2;
@@ -1,97 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/objectWithoutProperties";
3
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
6
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
7
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
8
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
10
- var _excluded = ["onMoveRow", "index", "className"];
11
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
12
- import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
13
- 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); }; }
14
- 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; } }
15
- import React from 'react';
16
- import variables from '../variables';
17
- var dragIndex = -1;
18
- var DragSortRow = /*#__PURE__*/function (_React$Component) {
19
- _inherits(DragSortRow, _React$Component);
20
- var _super = _createSuper(DragSortRow);
21
- function DragSortRow() {
22
- var _context, _context2;
23
- var _this;
24
- _classCallCheck(this, DragSortRow);
25
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
- args[_key] = arguments[_key];
27
- }
28
- _this = _super.call.apply(_super, _concatInstanceProperty(_context = [this]).call(_context, args));
29
- _defineProperty(_assertThisInitialized(_this), "state", {
30
- dragIndex: -1,
31
- firefox: _includesInstanceProperty(_context2 = navigator.userAgent).call(_context2, 'Firefox')
32
- });
33
- _defineProperty(_assertThisInitialized(_this), "onDragStart", function (e) {
34
- dragIndex = _this.props.index;
35
- if (_this.state.firefox) {
36
- // 火狐浏览器必须调用setData
37
- e.dataTransfer.setData('text/plain', 'DragSortRow');
38
- }
39
- });
40
- _defineProperty(_assertThisInitialized(_this), "onDragEnd", function () {
41
- dragIndex = -1;
42
- });
43
- _defineProperty(_assertThisInitialized(_this), "onDragOver", function (e) {
44
- if (dragIndex > -1 && dragIndex !== _this.props.index) {
45
- e.preventDefault();
46
- if (_this.state.dragIndex !== dragIndex) {
47
- _this.setState({
48
- dragIndex: dragIndex
49
- });
50
- }
51
- }
52
- });
53
- _defineProperty(_assertThisInitialized(_this), "onDragLeave", function () {
54
- _this.setState({
55
- dragIndex: -1
56
- });
57
- });
58
- _defineProperty(_assertThisInitialized(_this), "onDrop", function (e) {
59
- var dragIndex = _this.state.dragIndex;
60
- _this.setState({
61
- dragIndex: -1
62
- });
63
- _this.props.onMoveRow(dragIndex, _this.props.index);
64
-
65
- // 火狐浏览器默认会打开一个新窗口,此处阻止其打开
66
- if (_this.state.firefox) {
67
- e.preventDefault();
68
- }
69
- });
70
- return _this;
71
- }
72
- _createClass(DragSortRow, [{
73
- key: "render",
74
- value: function render() {
75
- var _context3;
76
- var _this$props = this.props,
77
- onMoveRow = _this$props.onMoveRow,
78
- index = _this$props.index,
79
- className = _this$props.className,
80
- restProps = _objectWithoutProperties(_this$props, _excluded);
81
- var dragIndex = this.state.dragIndex;
82
- restProps.className = _concatInstanceProperty(_context3 = "".concat(className, " ")).call(_context3, variables('DragSortRow'));
83
- restProps.draggable = true;
84
- restProps.onDragStart = this.onDragStart;
85
- restProps.onDragEnd = this.onDragEnd;
86
- restProps.onDragOver = this.onDragOver;
87
- restProps.onDragLeave = this.onDragLeave;
88
- restProps.onDrop = this.onDrop;
89
- if (dragIndex > -1) {
90
- restProps['data-drag-hover'] = dragIndex > index ? 'up' : 'down';
91
- }
92
- return /*#__PURE__*/React.createElement("tr", restProps);
93
- }
94
- }]);
95
- return DragSortRow;
96
- }(React.Component);
97
- export default DragSortRow;
@@ -1,164 +0,0 @@
1
- import _Reflect$construct from "@babel/runtime-corejs3/core-js-stable/reflect/construct";
2
- import _Input from "antd/es/input";
3
- import _Button from "antd/es/button";
4
- import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
5
- import _createClass from "@babel/runtime-corejs3/helpers/createClass";
6
- import _assertThisInitialized from "@babel/runtime-corejs3/helpers/assertThisInitialized";
7
- import _inherits from "@babel/runtime-corejs3/helpers/inherits";
8
- import _possibleConstructorReturn from "@babel/runtime-corejs3/helpers/possibleConstructorReturn";
9
- import _getPrototypeOf from "@babel/runtime-corejs3/helpers/getPrototypeOf";
10
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
11
- import _bindInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/bind";
12
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
16
- import Control from "../Control/Control";
17
- import variables from '../variables';
18
- var FilterDropDown = /*#__PURE__*/function (_React$Component) {
19
- _inherits(FilterDropDown, _React$Component);
20
- var _super = _createSuper(FilterDropDown);
21
- function FilterDropDown(_props) {
22
- var _this;
23
- _classCallCheck(this, FilterDropDown);
24
- _this = _super.call(this, _props);
25
- _defineProperty(_assertThisInitialized(_this), "onChange", function (e) {
26
- _this.setState({
27
- value: e.target.value
28
- });
29
- });
30
- _defineProperty(_assertThisInitialized(_this), "onDateChange", function (key, value) {
31
- _this.setState(_defineProperty({}, key, value));
32
- });
33
- _defineProperty(_assertThisInitialized(_this), "onSearch", function () {
34
- var _this$props = _this.props,
35
- onSearch = _this$props.onSearch,
36
- isDateFilterByStartAndEnd = _this$props.isDateFilterByStartAndEnd;
37
- if (onSearch) {
38
- var value = !_this.state.start && !_this.state.end ? "" : _this.state;
39
- var val = isDateFilterByStartAndEnd ? value : _this.state.value;
40
- onSearch(val);
41
- }
42
- });
43
- _defineProperty(_assertThisInitialized(_this), "DateInputCreator", function () {
44
- var _context, _context2, _context3;
45
- var props = _this.props.props;
46
- var propsStart = {
47
- type: "date",
48
- size: "small",
49
- showTime: props ? props.showTime : true,
50
- value: _this.state.start,
51
- style: {
52
- marginRight: '5px'
53
- },
54
- onChange: _bindInstanceProperty(_context = _this.onDateChange).call(_context, null, 'start')
55
- };
56
- var propsEnd = {
57
- type: "date",
58
- size: "small",
59
- showTime: props ? props.showTime : true,
60
- value: _this.state.end,
61
- style: {
62
- marginLeft: '5px'
63
- },
64
- onChange: _bindInstanceProperty(_context2 = _this.onDateChange).call(_context2, null, 'end')
65
- };
66
- return /*#__PURE__*/React.createElement("div", {
67
- className: variables('FilterDropDown').date
68
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Control, propsStart), "To", /*#__PURE__*/React.createElement(Control, propsEnd)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Button, {
69
- size: "small",
70
- style: {
71
- marginRight: '5px'
72
- },
73
- onClick: _this.props.onClose
74
- }, "\u5173\u95ED"), /*#__PURE__*/React.createElement(_Button, {
75
- size: "small",
76
- type: "primary",
77
- onClick: _bindInstanceProperty(_context3 = _this.onSearch).call(_context3, null, _this.props.type)
78
- }, "\u641C\u7D22")));
79
- });
80
- _defineProperty(_assertThisInitialized(_this), "InputCreator", function () {
81
- var props = {
82
- size: 'small',
83
- value: _this.state.value,
84
- onChange: _this.onChange,
85
- onPressEnter: _this.onSearch,
86
- ref: function ref(e) {
87
- return _this.input = e;
88
- }
89
- };
90
- return /*#__PURE__*/React.createElement("div", {
91
- className: variables('FilterDropDown')
92
- }, /*#__PURE__*/React.createElement(_Input, props), /*#__PURE__*/React.createElement(_Button, {
93
- onClick: _this.onSearch,
94
- size: "small",
95
- type: "primary"
96
- }, "\u641C\u7D22"));
97
- });
98
- _this.state = {
99
- value: _props.value || ''
100
- };
101
- if (_props.isDateFilterByStartAndEnd) {
102
- var _ref = _props.value || {},
103
- _ref$start = _ref.start,
104
- start = _ref$start === void 0 ? '' : _ref$start,
105
- _ref$end = _ref.end,
106
- end = _ref$end === void 0 ? '' : _ref$end;
107
- _this.state = {
108
- start: start,
109
- end: end
110
- };
111
- } else {
112
- _this.state = {
113
- value: _props.value || ''
114
- };
115
- }
116
- return _this;
117
- }
118
- _createClass(FilterDropDown, [{
119
- key: "componentWillReceiveProps",
120
- value: function componentWillReceiveProps(newProps) {
121
- if (newProps.isDateFilterByStartAndEnd) {
122
- var _ref2 = newProps.value || {},
123
- _ref2$start = _ref2.start,
124
- start = _ref2$start === void 0 ? '' : _ref2$start,
125
- _ref2$end = _ref2.end,
126
- end = _ref2$end === void 0 ? '' : _ref2$end;
127
- this.setState({
128
- start: start,
129
- end: end
130
- });
131
- } else {
132
- this.setState({
133
- value: newProps.value || ''
134
- });
135
- }
136
- }
137
- }, {
138
- key: "componentDidMount",
139
- value: function componentDidMount() {
140
- if (this.input) {
141
- this.input.focus();
142
- }
143
- }
144
- }, {
145
- key: "componentDidUpdate",
146
- value: function componentDidUpdate() {
147
- if (this.input) {
148
- this.input.focus();
149
- }
150
- }
151
- }, {
152
- key: "render",
153
- value: function render() {
154
- return this.props.isDateFilterByStartAndEnd ? this.DateInputCreator() : this.InputCreator();
155
- }
156
- }]);
157
- return FilterDropDown;
158
- }(React.Component);
159
- _defineProperty(FilterDropDown, "propTypes", {
160
- value: PropTypes.any,
161
- onSearch: PropTypes.func,
162
- onClose: PropTypes.func
163
- });
164
- export default FilterDropDown;