@vtx/components 3.1.24 → 3.1.26

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 (247) hide show
  1. package/lib/_util/filterSpecialCharacters.js +54 -43
  2. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  3. package/lib/_util/getComponentProps.js +0 -3
  4. package/lib/_util/getComponentProps.js.map +1 -1
  5. package/lib/_util/getUrlParam.js +0 -6
  6. package/lib/_util/getUrlParam.js.map +1 -1
  7. package/lib/_util/isFunction.js +0 -1
  8. package/lib/_util/isFunction.js.map +1 -1
  9. package/lib/_util/isObject.js +0 -1
  10. package/lib/_util/isObject.js.map +1 -1
  11. package/lib/_util/useColSize.js +1 -10
  12. package/lib/_util/useColSize.js.map +1 -1
  13. package/lib/_util/useInterval.js +0 -3
  14. package/lib/_util/useInterval.js.map +1 -1
  15. package/lib/_util/useSet.js +14 -32
  16. package/lib/_util/useSet.js.map +1 -1
  17. package/lib/config.js.map +1 -1
  18. package/lib/index.js +0 -26
  19. package/lib/index.js.map +1 -1
  20. package/lib/vtx-color-picker/index.js +5 -21
  21. package/lib/vtx-color-picker/index.js.map +1 -1
  22. package/lib/vtx-color-picker/style/css.js +0 -2
  23. package/lib/vtx-color-picker/style/css.js.map +1 -1
  24. package/lib/vtx-color-picker/style/index.js +0 -2
  25. package/lib/vtx-color-picker/style/index.js.map +1 -1
  26. package/lib/vtx-combogrid/Combogrid.js +34 -74
  27. package/lib/vtx-combogrid/Combogrid.js.map +1 -1
  28. package/lib/vtx-combogrid/index.js +20 -45
  29. package/lib/vtx-combogrid/index.js.map +1 -1
  30. package/lib/vtx-combogrid/style/css.js +0 -7
  31. package/lib/vtx-combogrid/style/css.js.map +1 -1
  32. package/lib/vtx-combogrid/style/index.js +0 -7
  33. package/lib/vtx-combogrid/style/index.js.map +1 -1
  34. package/lib/vtx-datagrid/Alert.js +3 -11
  35. package/lib/vtx-datagrid/Alert.js.map +1 -1
  36. package/lib/vtx-datagrid/ColumnSetting.js +19 -44
  37. package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
  38. package/lib/vtx-datagrid/ResizeableTitle.js +2 -13
  39. package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
  40. package/lib/vtx-datagrid/index.js +77 -142
  41. package/lib/vtx-datagrid/index.js.map +1 -1
  42. package/lib/vtx-datagrid/renderColumnButtons.js +5 -35
  43. package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
  44. package/lib/vtx-datagrid/style/css.js +0 -10
  45. package/lib/vtx-datagrid/style/css.js.map +1 -1
  46. package/lib/vtx-datagrid/style/index.js +0 -10
  47. package/lib/vtx-datagrid/style/index.js.map +1 -1
  48. package/lib/vtx-date-picker/QdatePicker.js +16 -46
  49. package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
  50. package/lib/vtx-date-picker/generatePicker.js +6 -47
  51. package/lib/vtx-date-picker/generatePicker.js.map +1 -1
  52. package/lib/vtx-date-picker/index.js +0 -5
  53. package/lib/vtx-date-picker/index.js.map +1 -1
  54. package/lib/vtx-date-picker/style/css.js +0 -1
  55. package/lib/vtx-date-picker/style/css.js.map +1 -1
  56. package/lib/vtx-date-picker/style/index.js +0 -1
  57. package/lib/vtx-date-picker/style/index.js.map +1 -1
  58. package/lib/vtx-editor/index.js +5 -23
  59. package/lib/vtx-editor/index.js.map +1 -1
  60. package/lib/vtx-editor/style/css.js +0 -1
  61. package/lib/vtx-editor/style/css.js.map +1 -1
  62. package/lib/vtx-editor/style/index.js +0 -1
  63. package/lib/vtx-editor/style/index.js.map +1 -1
  64. package/lib/vtx-ellipsis-text/index.js +6 -20
  65. package/lib/vtx-ellipsis-text/index.js.map +1 -1
  66. package/lib/vtx-ellipsis-text/style/css.js +0 -1
  67. package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
  68. package/lib/vtx-ellipsis-text/style/index.js +0 -1
  69. package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
  70. package/lib/vtx-export/index.js +25 -58
  71. package/lib/vtx-export/index.js.map +1 -1
  72. package/lib/vtx-export/style/css.js +0 -5
  73. package/lib/vtx-export/style/css.js.map +1 -1
  74. package/lib/vtx-export/style/index.js +0 -5
  75. package/lib/vtx-export/style/index.js.map +1 -1
  76. package/lib/vtx-form-layout/Card.js +5 -26
  77. package/lib/vtx-form-layout/Card.js.map +1 -1
  78. package/lib/vtx-form-layout/Divider.js +0 -8
  79. package/lib/vtx-form-layout/Divider.js.map +1 -1
  80. package/lib/vtx-form-layout/FormItem.js +8 -30
  81. package/lib/vtx-form-layout/FormItem.js.map +1 -1
  82. package/lib/vtx-form-layout/Pane.js +2 -7
  83. package/lib/vtx-form-layout/Pane.js.map +1 -1
  84. package/lib/vtx-form-layout/Row.js +0 -6
  85. package/lib/vtx-form-layout/Row.js.map +1 -1
  86. package/lib/vtx-form-layout/context.js +0 -2
  87. package/lib/vtx-form-layout/context.js.map +1 -1
  88. package/lib/vtx-form-layout/index.js +8 -22
  89. package/lib/vtx-form-layout/index.js.map +1 -1
  90. package/lib/vtx-form-layout/style/css.js +0 -7
  91. package/lib/vtx-form-layout/style/css.js.map +1 -1
  92. package/lib/vtx-form-layout/style/index.js +0 -7
  93. package/lib/vtx-form-layout/style/index.js.map +1 -1
  94. package/lib/vtx-image/Image.js +56 -92
  95. package/lib/vtx-image/Image.js.map +1 -1
  96. package/lib/vtx-image/Preview.js +20 -51
  97. package/lib/vtx-image/Preview.js.map +1 -1
  98. package/lib/vtx-image/PreviewGroup.js +11 -40
  99. package/lib/vtx-image/PreviewGroup.js.map +1 -1
  100. package/lib/vtx-image/index.js +0 -6
  101. package/lib/vtx-image/index.js.map +1 -1
  102. package/lib/vtx-image/style/css.js +0 -1
  103. package/lib/vtx-image/style/css.js.map +1 -1
  104. package/lib/vtx-image/style/index.js +0 -1
  105. package/lib/vtx-image/style/index.js.map +1 -1
  106. package/lib/vtx-import/index.js +37 -72
  107. package/lib/vtx-import/index.js.map +1 -1
  108. package/lib/vtx-import/result.js +7 -24
  109. package/lib/vtx-import/result.js.map +1 -1
  110. package/lib/vtx-import/style/css.js +0 -3
  111. package/lib/vtx-import/style/css.js.map +1 -1
  112. package/lib/vtx-import/style/index.js +0 -3
  113. package/lib/vtx-import/style/index.js.map +1 -1
  114. package/lib/vtx-import2/CheckResult.js +0 -6
  115. package/lib/vtx-import2/CheckResult.js.map +1 -1
  116. package/lib/vtx-import2/Content.js +4 -25
  117. package/lib/vtx-import2/Content.js.map +1 -1
  118. package/lib/vtx-import2/DownloadSvg.js +0 -4
  119. package/lib/vtx-import2/DownloadSvg.js.map +1 -1
  120. package/lib/vtx-import2/ImportResult.js +5 -11
  121. package/lib/vtx-import2/ImportResult.js.map +1 -1
  122. package/lib/vtx-import2/UploadSvg.js +0 -4
  123. package/lib/vtx-import2/UploadSvg.js.map +1 -1
  124. package/lib/vtx-import2/index.js +38 -92
  125. package/lib/vtx-import2/index.js.map +1 -1
  126. package/lib/vtx-import2/style/css.js +0 -3
  127. package/lib/vtx-import2/style/css.js.map +1 -1
  128. package/lib/vtx-import2/style/index.js +0 -3
  129. package/lib/vtx-import2/style/index.js.map +1 -1
  130. package/lib/vtx-input/TextArea.js +6 -22
  131. package/lib/vtx-input/TextArea.js.map +1 -1
  132. package/lib/vtx-input/index.js +11 -37
  133. package/lib/vtx-input/index.js.map +1 -1
  134. package/lib/vtx-input/style/css.js +0 -1
  135. package/lib/vtx-input/style/css.js.map +1 -1
  136. package/lib/vtx-input/style/index.js +0 -1
  137. package/lib/vtx-input/style/index.js.map +1 -1
  138. package/lib/vtx-input/useLength.js +4 -16
  139. package/lib/vtx-input/useLength.js.map +1 -1
  140. package/lib/vtx-modal/Title.js +1 -6
  141. package/lib/vtx-modal/Title.js.map +1 -1
  142. package/lib/vtx-modal/index.js +30 -70
  143. package/lib/vtx-modal/index.js.map +1 -1
  144. package/lib/vtx-modal/style/css.js +0 -1
  145. package/lib/vtx-modal/style/css.js.map +1 -1
  146. package/lib/vtx-modal/style/index.js +0 -1
  147. package/lib/vtx-modal/style/index.js.map +1 -1
  148. package/lib/vtx-page-layout/Basic.js +2 -6
  149. package/lib/vtx-page-layout/Basic.js.map +1 -1
  150. package/lib/vtx-page-layout/Content.js +7 -19
  151. package/lib/vtx-page-layout/Content.js.map +1 -1
  152. package/lib/vtx-page-layout/Pane.js +2 -10
  153. package/lib/vtx-page-layout/Pane.js.map +1 -1
  154. package/lib/vtx-page-layout/TableLayout.js +17 -47
  155. package/lib/vtx-page-layout/TableLayout.js.map +1 -1
  156. package/lib/vtx-page-layout/TableWrap.js +3 -15
  157. package/lib/vtx-page-layout/TableWrap.js.map +1 -1
  158. package/lib/vtx-page-layout/container.js +4 -34
  159. package/lib/vtx-page-layout/container.js.map +1 -1
  160. package/lib/vtx-page-layout/index.js +0 -8
  161. package/lib/vtx-page-layout/index.js.map +1 -1
  162. package/lib/vtx-rps-frame/index.js +27 -45
  163. package/lib/vtx-rps-frame/index.js.map +1 -1
  164. package/lib/vtx-scrollable-row/index.js +19 -57
  165. package/lib/vtx-scrollable-row/index.js.map +1 -1
  166. package/lib/vtx-search/VtxCol.js +0 -21
  167. package/lib/vtx-search/VtxCol.js.map +1 -1
  168. package/lib/vtx-search/VtxRow.js +6 -12
  169. package/lib/vtx-search/VtxRow.js.map +1 -1
  170. package/lib/vtx-search/index.js +40 -93
  171. package/lib/vtx-search/index.js.map +1 -1
  172. package/lib/vtx-search/style/css.js +0 -4
  173. package/lib/vtx-search/style/css.js.map +1 -1
  174. package/lib/vtx-search/style/index.js +0 -4
  175. package/lib/vtx-search/style/index.js.map +1 -1
  176. package/lib/vtx-search-map-input/index.js +42 -73
  177. package/lib/vtx-search-map-input/index.js.map +1 -1
  178. package/lib/vtx-search-map-input/style/css.js +0 -2
  179. package/lib/vtx-search-map-input/style/css.js.map +1 -1
  180. package/lib/vtx-search-map-input/style/index.js +0 -2
  181. package/lib/vtx-search-map-input/style/index.js.map +1 -1
  182. package/lib/vtx-select/index.js +20 -65
  183. package/lib/vtx-select/index.js.map +1 -1
  184. package/lib/vtx-select/style/css.js +0 -8
  185. package/lib/vtx-select/style/css.js.map +1 -1
  186. package/lib/vtx-select/style/index.js +0 -8
  187. package/lib/vtx-select/style/index.js.map +1 -1
  188. package/lib/vtx-signature/index.js +14 -28
  189. package/lib/vtx-signature/index.js.map +1 -1
  190. package/lib/vtx-signature/style/css.js +0 -2
  191. package/lib/vtx-signature/style/css.js.map +1 -1
  192. package/lib/vtx-signature/style/index.js +0 -2
  193. package/lib/vtx-signature/style/index.js.map +1 -1
  194. package/lib/vtx-split-pane/Pane.js +2 -14
  195. package/lib/vtx-split-pane/Pane.js.map +1 -1
  196. package/lib/vtx-split-pane/Resizer.js +9 -29
  197. package/lib/vtx-split-pane/Resizer.js.map +1 -1
  198. package/lib/vtx-split-pane/SplitPane.js +39 -94
  199. package/lib/vtx-split-pane/SplitPane.js.map +1 -1
  200. package/lib/vtx-split-pane/index.js +0 -4
  201. package/lib/vtx-split-pane/index.js.map +1 -1
  202. package/lib/vtx-split-pane/style/css.js +0 -3
  203. package/lib/vtx-split-pane/style/css.js.map +1 -1
  204. package/lib/vtx-split-pane/style/index.js +0 -3
  205. package/lib/vtx-split-pane/style/index.js.map +1 -1
  206. package/lib/vtx-statistics-column/Back.js +1 -7
  207. package/lib/vtx-statistics-column/Back.js.map +1 -1
  208. package/lib/vtx-statistics-column/Item.js +5 -22
  209. package/lib/vtx-statistics-column/Item.js.map +1 -1
  210. package/lib/vtx-statistics-column/Total.js +5 -22
  211. package/lib/vtx-statistics-column/Total.js.map +1 -1
  212. package/lib/vtx-statistics-column/context.js +0 -2
  213. package/lib/vtx-statistics-column/context.js.map +1 -1
  214. package/lib/vtx-statistics-column/index.js +0 -16
  215. package/lib/vtx-statistics-column/index.js.map +1 -1
  216. package/lib/vtx-time-picker/index.js +3 -16
  217. package/lib/vtx-time-picker/index.js.map +1 -1
  218. package/lib/vtx-upload/FilePreview.js +9 -28
  219. package/lib/vtx-upload/FilePreview.js.map +1 -1
  220. package/lib/vtx-upload/index.js +67 -137
  221. package/lib/vtx-upload/index.js.map +1 -1
  222. package/lib/vtx-upload/style/css.js +0 -5
  223. package/lib/vtx-upload/style/css.js.map +1 -1
  224. package/lib/vtx-upload/style/index.js +0 -5
  225. package/lib/vtx-upload/style/index.js.map +1 -1
  226. package/lib/vtx-wang-editor/index.js +36 -66
  227. package/lib/vtx-wang-editor/index.js.map +1 -1
  228. package/lib/vtx-wang-editor/style/css.js +0 -1
  229. package/lib/vtx-wang-editor/style/css.js.map +1 -1
  230. package/lib/vtx-wang-editor/style/index.js +0 -1
  231. package/lib/vtx-wang-editor/style/index.js.map +1 -1
  232. package/lib/vtx-wang-editor/wangEditorUtil.js +30 -88
  233. package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
  234. package/lib/vtx-ztree/index.js +49 -101
  235. package/lib/vtx-ztree/index.js.map +1 -1
  236. package/lib/vtx-ztree/style/css.js +0 -1
  237. package/lib/vtx-ztree/style/css.js.map +1 -1
  238. package/lib/vtx-ztree/style/index.js +0 -1
  239. package/lib/vtx-ztree/style/index.js.map +1 -1
  240. package/lib/vtx-ztree-select/index.js +43 -99
  241. package/lib/vtx-ztree-select/index.js.map +1 -1
  242. package/lib/vtx-ztree-select/style/css.js +0 -3
  243. package/lib/vtx-ztree-select/style/css.js.map +1 -1
  244. package/lib/vtx-ztree-select/style/index.js +0 -3
  245. package/lib/vtx-ztree-select/style/index.js.map +1 -1
  246. package/package.json +126 -126
  247. package/CHANGELOG.md +0 -1248
@@ -1 +1 @@
1
- {"version":3,"file":"css.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA;AACA"}
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/lib/modal/style");
4
-
5
4
  require("antd/lib/button/style");
6
-
7
5
  require("antd/lib/message/style");
8
-
9
6
  require("./index.less");
10
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA;;AACA;;AACA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["vtx-import2/style/index.js"],"sourcesContent":["import 'antd/lib/modal/style';\nimport 'antd/lib/button/style';\nimport 'antd/lib/message/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA;AACA;AACA"}
@@ -1,54 +1,38 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _input = _interopRequireDefault(require("antd/lib/input"));
15
-
16
11
  var _useLength = _interopRequireDefault(require("./useLength"));
17
-
18
12
  var _excluded = ["maxLength", "showCount", "placeholder"];
19
-
20
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
23
-
24
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
16
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
-
28
17
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
29
-
30
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
31
-
32
19
  var TextArea = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
33
20
  var _props$maxLength = props.maxLength,
34
- maxLength = _props$maxLength === void 0 ? 200 : _props$maxLength,
35
- _props$showCount = props.showCount,
36
- showCount = _props$showCount === void 0 ? true : _props$showCount,
37
- _props$placeholder = props.placeholder,
38
- placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
39
- rest = _objectWithoutProperties(props, _excluded);
40
-
21
+ maxLength = _props$maxLength === void 0 ? 200 : _props$maxLength,
22
+ _props$showCount = props.showCount,
23
+ showCount = _props$showCount === void 0 ? true : _props$showCount,
24
+ _props$placeholder = props.placeholder,
25
+ placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
26
+ rest = _objectWithoutProperties(props, _excluded);
41
27
  var len = (0, _useLength["default"])(props.value, {
42
28
  showCount: showCount
43
29
  });
44
-
45
30
  var render = /*#__PURE__*/_react["default"].createElement(_input["default"].TextArea, _extends({
46
31
  placeholder: placeholder,
47
32
  maxLength: maxLength
48
33
  }, rest, {
49
34
  ref: ref
50
35
  }));
51
-
52
36
  showCount && 'value' in props && (render = /*#__PURE__*/_react["default"].createElement("div", {
53
37
  className: "vtx-input-textarea",
54
38
  "data-count": "".concat(len, "/").concat(maxLength)
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport useLength from './useLength';\n\nconst TextArea = forwardRef((props, ref) => {\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\n const len = useLength(props.value, { showCount });\n\n let render = (\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\n );\n\n showCount &&\n 'value' in props &&\n (render = (\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\n {render}\n </div>\n ));\n return render;\n});\n\nexport default TextArea;\n\nTextArea.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n placeholder: PropTypes.string,\n};\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,uBAA4ED,KAA5E,CAAQE,SAAR;EAAA,IAAQA,SAAR,iCAAoB,GAApB;EAAA,uBAA4EF,KAA5E,CAAyBG,SAAzB;EAAA,IAAyBA,SAAzB,iCAAqC,IAArC;EAAA,yBAA4EH,KAA5E,CAA2CI,WAA3C;EAAA,IAA2CA,WAA3C,mCAAyD,KAAzD;EAAA,IAAmEC,IAAnE,4BAA4EL,KAA5E;;EACA,IAAMM,GAAG,GAAG,IAAAC,qBAAA,EAAUP,KAAK,CAACQ,KAAhB,EAAuB;IAAEL,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIM,MAAM,gBACN,gCAAC,iBAAD,CAAO,QAAP;IAAgB,WAAW,EAAEL,WAA7B;IAA0C,SAAS,EAAEF;EAArD,GAAoEG,IAApE;IAA0E,GAAG,EAAEJ;EAA/E,GADJ;;EAIAE,SAAS,IACL,WAAWH,KADf,KAEKS,MAAM,gBACH;IAAK,SAAS,EAAC,oBAAf;IAAoC,wBAAeH,GAAf,cAAsBJ,SAAtB;EAApC,GACKO,MADL,CAHR;EAOA,OAAOA,MAAP;AACH,CAhBgB,CAAjB;eAkBeX,Q;;AAEfA,QAAQ,CAACY,SAAT,GAAqB;EACjBR,SAAS,EAAES,qBAAA,CAAUC,MADJ;EAEjBJ,KAAK,EAAEG,qBAAA,CAAUE,MAFA;EAGjBV,SAAS,EAAEQ,qBAAA,CAAUG,IAHJ;EAIjBV,WAAW,EAAEO,qBAAA,CAAUE;AAJN,CAArB"}
1
+ {"version":3,"file":"TextArea.js","names":["TextArea","forwardRef","props","ref","maxLength","showCount","placeholder","rest","len","useLength","value","render","propTypes","PropTypes","number","string","bool"],"sources":["vtx-input/TextArea.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport useLength from './useLength';\n\nconst TextArea = forwardRef((props, ref) => {\n const { maxLength = 200, showCount = true, placeholder = '请输入', ...rest } = props;\n const len = useLength(props.value, { showCount });\n\n let render = (\n <Input.TextArea placeholder={placeholder} maxLength={maxLength} {...rest} ref={ref} />\n );\n\n showCount &&\n 'value' in props &&\n (render = (\n <div className=\"vtx-input-textarea\" data-count={`${len}/${maxLength}`}>\n {render}\n </div>\n ));\n return render;\n});\n\nexport default TextArea;\n\nTextArea.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n placeholder: PropTypes.string,\n};\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AAAoC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEpC,IAAMA,QAAQ,gBAAG,IAAAC,iBAAU,EAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;EACxC,uBAA4ED,KAAK,CAAzEE,SAAS;IAATA,SAAS,iCAAG,GAAG;IAAA,mBAAqDF,KAAK,CAAxDG,SAAS;IAATA,SAAS,iCAAG,IAAI;IAAA,qBAAmCH,KAAK,CAAtCI,WAAW;IAAXA,WAAW,mCAAG,KAAK;IAAKC,IAAI,4BAAKL,KAAK;EACjF,IAAMM,GAAG,GAAG,IAAAC,qBAAS,EAACP,KAAK,CAACQ,KAAK,EAAE;IAAEL,SAAS,EAATA;EAAU,CAAC,CAAC;EAEjD,IAAIM,MAAM,gBACN,gCAAC,iBAAK,CAAC,QAAQ;IAAC,WAAW,EAAEL,WAAY;IAAC,SAAS,EAAEF;EAAU,GAAKG,IAAI;IAAE,GAAG,EAAEJ;EAAI,GACtF;EAEDE,SAAS,IACL,OAAO,IAAIH,KAAK,KACfS,MAAM,gBACH;IAAK,SAAS,EAAC,oBAAoB;IAAC,wBAAeH,GAAG,cAAIJ,SAAS;EAAG,GACjEO,MAAM,CAEd,CAAC;EACN,OAAOA,MAAM;AACjB,CAAC,CAAC;AAAC,eAEYX,QAAQ;AAAA;AAEvBA,QAAQ,CAACY,SAAS,GAAG;EACjBR,SAAS,EAAES,qBAAS,CAACC,MAAM;EAC3BJ,KAAK,EAAEG,qBAAS,CAACE,MAAM;EACvBV,SAAS,EAAEQ,qBAAS,CAACG,IAAI;EACzBV,WAAW,EAAEO,qBAAS,CAACE;AAC3B,CAAC"}
@@ -1,66 +1,44 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _input = _interopRequireDefault(require("antd/lib/input"));
15
-
16
11
  var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
17
-
18
12
  var _TextArea = _interopRequireDefault(require("./TextArea"));
19
-
20
13
  var _useLength = _interopRequireDefault(require("./useLength"));
21
-
22
14
  var _getComponentProps = _interopRequireDefault(require("../_util/getComponentProps"));
23
-
24
15
  var _filterSpecialCharacters = _interopRequireDefault(require("../_util/filterSpecialCharacters"));
25
-
26
16
  var _excluded = ["showCount", "maxLength", "specialCharactersFilter", "trim", "onChange", "onBlur", "placeholder"];
27
-
28
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
29
-
30
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
-
32
19
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
-
34
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
35
-
36
21
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
-
38
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
-
40
23
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
41
-
42
24
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
43
-
44
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
-
46
26
  var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
47
27
  var showCount = props.showCount,
48
- _props$maxLength = props.maxLength,
49
- maxLength = _props$maxLength === void 0 ? 32 : _props$maxLength,
50
- _props$specialCharact = props.specialCharactersFilter,
51
- specialCharactersFilter = _props$specialCharact === void 0 ? true : _props$specialCharact,
52
- _props$trim = props.trim,
53
- trim = _props$trim === void 0 ? true : _props$trim,
54
- onChange = props.onChange,
55
- _onBlur = props.onBlur,
56
- _props$placeholder = props.placeholder,
57
- placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
58
- rest = _objectWithoutProperties(props, _excluded);
59
-
28
+ _props$maxLength = props.maxLength,
29
+ maxLength = _props$maxLength === void 0 ? 32 : _props$maxLength,
30
+ _props$specialCharact = props.specialCharactersFilter,
31
+ specialCharactersFilter = _props$specialCharact === void 0 ? true : _props$specialCharact,
32
+ _props$trim = props.trim,
33
+ trim = _props$trim === void 0 ? true : _props$trim,
34
+ onChange = props.onChange,
35
+ _onBlur = props.onBlur,
36
+ _props$placeholder = props.placeholder,
37
+ placeholder = _props$placeholder === void 0 ? '请输入' : _props$placeholder,
38
+ rest = _objectWithoutProperties(props, _excluded);
60
39
  var len = (0, _useLength["default"])(props.value, {
61
40
  showCount: showCount
62
41
  });
63
-
64
42
  var newProps = _objectSpread({
65
43
  ref: ref,
66
44
  maxLength: maxLength,
@@ -68,22 +46,18 @@ var VtxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
68
46
  onBlur: function onBlur(e) {
69
47
  var value = e.target.value;
70
48
  var $e = e;
71
-
72
49
  if (trim) {
73
50
  value = value.trim();
74
51
  }
75
-
76
52
  if (specialCharactersFilter && value) {
77
53
  $e = (0, _lodash["default"])(e);
78
54
  $e.target.value = (0, _filterSpecialCharacters["default"])(value, (0, _getComponentProps["default"])(specialCharactersFilter));
79
55
  onChange && onChange($e);
80
56
  }
81
-
82
57
  _onBlur && _onBlur($e);
83
58
  },
84
59
  onChange: onChange
85
60
  }, rest);
86
-
87
61
  showCount && 'value' in props && (newProps = _objectSpread({
88
62
  suffix: "".concat(len, "/").concat(maxLength)
89
63
  }, newProps));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport cloneDeep from 'lodash.clonedeep';\nimport TextArea from './TextArea';\nimport useLength from './useLength';\nimport getComponentProps from '../_util/getComponentProps';\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\n\nconst VtxInput = forwardRef((props, ref) => {\n const {\n showCount,\n maxLength = 32,\n specialCharactersFilter = true,\n trim = true,\n onChange,\n onBlur,\n placeholder = '请输入',\n ...rest\n } = props;\n\n const len = useLength(props.value, { showCount });\n\n let newProps = {\n ref,\n maxLength,\n placeholder,\n onBlur(e) {\n let value = e.target.value;\n let $e = e;\n if (trim) {\n value = value.trim();\n }\n if (specialCharactersFilter && value) {\n $e = cloneDeep(e);\n $e.target.value = filterSpecialCharacters(\n value,\n getComponentProps(specialCharactersFilter),\n );\n onChange && onChange($e);\n }\n onBlur && onBlur($e);\n },\n onChange,\n ...rest,\n };\n\n showCount &&\n 'value' in props &&\n (newProps = {\n suffix: `${len}/${maxLength}`,\n ...newProps,\n });\n\n return <Input {...newProps} autoComplete=\"off\" />;\n});\n\nVtxInput.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n placeholder: PropTypes.string,\n trim: PropTypes.bool,\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n};\n\nVtxInput.Search = Input.Search;\nVtxInput.Group = Input.Group;\nVtxInput.Password = Input.Password;\nVtxInput.TextArea = TextArea;\n\nexport default VtxInput;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,QAAQ,gBAAG,IAAAC,iBAAA,EAAW,UAACC,KAAD,EAAQC,GAAR,EAAgB;EACxC,IACIC,SADJ,GASIF,KATJ,CACIE,SADJ;EAAA,uBASIF,KATJ,CAEIG,SAFJ;EAAA,IAEIA,SAFJ,iCAEgB,EAFhB;EAAA,4BASIH,KATJ,CAGII,uBAHJ;EAAA,IAGIA,uBAHJ,sCAG8B,IAH9B;EAAA,kBASIJ,KATJ,CAIIK,IAJJ;EAAA,IAIIA,IAJJ,4BAIW,IAJX;EAAA,IAKIC,QALJ,GASIN,KATJ,CAKIM,QALJ;EAAA,IAMIC,OANJ,GASIP,KATJ,CAMIO,MANJ;EAAA,yBASIP,KATJ,CAOIQ,WAPJ;EAAA,IAOIA,WAPJ,mCAOkB,KAPlB;EAAA,IAQOC,IARP,4BASIT,KATJ;;EAWA,IAAMU,GAAG,GAAG,IAAAC,qBAAA,EAAUX,KAAK,CAACY,KAAhB,EAAuB;IAAEV,SAAS,EAATA;EAAF,CAAvB,CAAZ;;EAEA,IAAIW,QAAQ;IACRZ,GAAG,EAAHA,GADQ;IAERE,SAAS,EAATA,SAFQ;IAGRK,WAAW,EAAXA,WAHQ;IAIRD,MAJQ,kBAIDO,CAJC,EAIE;MACN,IAAIF,KAAK,GAAGE,CAAC,CAACC,MAAF,CAASH,KAArB;MACA,IAAII,EAAE,GAAGF,CAAT;;MACA,IAAIT,IAAJ,EAAU;QACNO,KAAK,GAAGA,KAAK,CAACP,IAAN,EAAR;MACH;;MACD,IAAID,uBAAuB,IAAIQ,KAA/B,EAAsC;QAClCI,EAAE,GAAG,IAAAC,kBAAA,EAAUH,CAAV,CAAL;QACAE,EAAE,CAACD,MAAH,CAAUH,KAAV,GAAkB,IAAAM,mCAAA,EACdN,KADc,EAEd,IAAAO,6BAAA,EAAkBf,uBAAlB,CAFc,CAAlB;QAIAE,QAAQ,IAAIA,QAAQ,CAACU,EAAD,CAApB;MACH;;MACDT,OAAM,IAAIA,OAAM,CAACS,EAAD,CAAhB;IACH,CAnBO;IAoBRV,QAAQ,EAARA;EApBQ,GAqBLG,IArBK,CAAZ;;EAwBAP,SAAS,IACL,WAAWF,KADf,KAEKa,QAAQ;IACLO,MAAM,YAAKV,GAAL,cAAYP,SAAZ;EADD,GAEFU,QAFE,CAFb;EAOA,oBAAO,gCAAC,iBAAD,eAAWA,QAAX;IAAqB,YAAY,EAAC;EAAlC,GAAP;AACH,CA9CgB,CAAjB;AAgDAf,QAAQ,CAACuB,SAAT,GAAqB;EACjBlB,SAAS,EAAEmB,qBAAA,CAAUC,MADJ;EAEjBX,KAAK,EAAEU,qBAAA,CAAUE,MAFA;EAGjBtB,SAAS,EAAEoB,qBAAA,CAAUG,IAHJ;EAIjBnB,QAAQ,EAAEgB,qBAAA,CAAUI,IAJH;EAKjBnB,MAAM,EAAEe,qBAAA,CAAUI,IALD;EAMjBlB,WAAW,EAAEc,qBAAA,CAAUE,MANN;EAOjBnB,IAAI,EAAEiB,qBAAA,CAAUG,IAPC;EAQjBrB,uBAAuB,EAAEkB,qBAAA,CAAUK,SAAV,CAAoB,CAACL,qBAAA,CAAUG,IAAX,EAAiBH,qBAAA,CAAUM,MAA3B,CAApB;AARR,CAArB;AAWA9B,QAAQ,CAAC+B,MAAT,GAAkBC,iBAAA,CAAMD,MAAxB;AACA/B,QAAQ,CAACiC,KAAT,GAAiBD,iBAAA,CAAMC,KAAvB;AACAjC,QAAQ,CAACkC,QAAT,GAAoBF,iBAAA,CAAME,QAA1B;AACAlC,QAAQ,CAACmC,QAAT,GAAoBA,oBAApB;eAEenC,Q"}
1
+ {"version":3,"file":"index.js","names":["VtxInput","forwardRef","props","ref","showCount","maxLength","specialCharactersFilter","trim","onChange","onBlur","placeholder","rest","len","useLength","value","newProps","e","target","$e","cloneDeep","filterSpecialCharacters","getComponentProps","suffix","propTypes","PropTypes","number","string","bool","func","oneOfType","object","Search","Input","Group","Password","TextArea"],"sources":["vtx-input/index.jsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'antd/lib/input';\nimport cloneDeep from 'lodash.clonedeep';\nimport TextArea from './TextArea';\nimport useLength from './useLength';\nimport getComponentProps from '../_util/getComponentProps';\nimport filterSpecialCharacters from '../_util/filterSpecialCharacters';\n\nconst VtxInput = forwardRef((props, ref) => {\n const {\n showCount,\n maxLength = 32,\n specialCharactersFilter = true,\n trim = true,\n onChange,\n onBlur,\n placeholder = '请输入',\n ...rest\n } = props;\n\n const len = useLength(props.value, { showCount });\n\n let newProps = {\n ref,\n maxLength,\n placeholder,\n onBlur(e) {\n let value = e.target.value;\n let $e = e;\n if (trim) {\n value = value.trim();\n }\n if (specialCharactersFilter && value) {\n $e = cloneDeep(e);\n $e.target.value = filterSpecialCharacters(\n value,\n getComponentProps(specialCharactersFilter),\n );\n onChange && onChange($e);\n }\n onBlur && onBlur($e);\n },\n onChange,\n ...rest,\n };\n\n showCount &&\n 'value' in props &&\n (newProps = {\n suffix: `${len}/${maxLength}`,\n ...newProps,\n });\n\n return <Input {...newProps} autoComplete=\"off\" />;\n});\n\nVtxInput.propTypes = {\n maxLength: PropTypes.number,\n value: PropTypes.string,\n showCount: PropTypes.bool,\n onChange: PropTypes.func,\n onBlur: PropTypes.func,\n placeholder: PropTypes.string,\n trim: PropTypes.bool,\n specialCharactersFilter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),\n};\n\nVtxInput.Search = Input.Search;\nVtxInput.Group = Input.Group;\nVtxInput.Password = Input.Password;\nVtxInput.TextArea = TextArea;\n\nexport default VtxInput;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAuE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEvE,IAAMA,QAAQ,gBAAG,IAAAC,iBAAU,EAAC,UAACC,KAAK,EAAEC,GAAG,EAAK;EACxC,IACIC,SAAS,GAQTF,KAAK,CARLE,SAAS;IAAA,mBAQTF,KAAK,CAPLG,SAAS;IAATA,SAAS,iCAAG,EAAE;IAAA,wBAOdH,KAAK,CANLI,uBAAuB;IAAvBA,uBAAuB,sCAAG,IAAI;IAAA,cAM9BJ,KAAK,CALLK,IAAI;IAAJA,IAAI,4BAAG,IAAI;IACXC,QAAQ,GAIRN,KAAK,CAJLM,QAAQ;IACRC,OAAM,GAGNP,KAAK,CAHLO,MAAM;IAAA,qBAGNP,KAAK,CAFLQ,WAAW;IAAXA,WAAW,mCAAG,KAAK;IAChBC,IAAI,4BACPT,KAAK;EAET,IAAMU,GAAG,GAAG,IAAAC,qBAAS,EAACX,KAAK,CAACY,KAAK,EAAE;IAAEV,SAAS,EAATA;EAAU,CAAC,CAAC;EAEjD,IAAIW,QAAQ;IACRZ,GAAG,EAAHA,GAAG;IACHE,SAAS,EAATA,SAAS;IACTK,WAAW,EAAXA,WAAW;IACXD,MAAM,kBAACO,CAAC,EAAE;MACN,IAAIF,KAAK,GAAGE,CAAC,CAACC,MAAM,CAACH,KAAK;MAC1B,IAAII,EAAE,GAAGF,CAAC;MACV,IAAIT,IAAI,EAAE;QACNO,KAAK,GAAGA,KAAK,CAACP,IAAI,EAAE;MACxB;MACA,IAAID,uBAAuB,IAAIQ,KAAK,EAAE;QAClCI,EAAE,GAAG,IAAAC,kBAAS,EAACH,CAAC,CAAC;QACjBE,EAAE,CAACD,MAAM,CAACH,KAAK,GAAG,IAAAM,mCAAuB,EACrCN,KAAK,EACL,IAAAO,6BAAiB,EAACf,uBAAuB,CAAC,CAC7C;QACDE,QAAQ,IAAIA,QAAQ,CAACU,EAAE,CAAC;MAC5B;MACAT,OAAM,IAAIA,OAAM,CAACS,EAAE,CAAC;IACxB,CAAC;IACDV,QAAQ,EAARA;EAAQ,GACLG,IAAI,CACV;EAEDP,SAAS,IACL,OAAO,IAAIF,KAAK,KACfa,QAAQ;IACLO,MAAM,YAAKV,GAAG,cAAIP,SAAS;EAAE,GAC1BU,QAAQ,CACd,CAAC;EAEN,oBAAO,gCAAC,iBAAK,eAAKA,QAAQ;IAAE,YAAY,EAAC;EAAK,GAAG;AACrD,CAAC,CAAC;AAEFf,QAAQ,CAACuB,SAAS,GAAG;EACjBlB,SAAS,EAAEmB,qBAAS,CAACC,MAAM;EAC3BX,KAAK,EAAEU,qBAAS,CAACE,MAAM;EACvBtB,SAAS,EAAEoB,qBAAS,CAACG,IAAI;EACzBnB,QAAQ,EAAEgB,qBAAS,CAACI,IAAI;EACxBnB,MAAM,EAAEe,qBAAS,CAACI,IAAI;EACtBlB,WAAW,EAAEc,qBAAS,CAACE,MAAM;EAC7BnB,IAAI,EAAEiB,qBAAS,CAACG,IAAI;EACpBrB,uBAAuB,EAAEkB,qBAAS,CAACK,SAAS,CAAC,CAACL,qBAAS,CAACG,IAAI,EAAEH,qBAAS,CAACM,MAAM,CAAC;AACnF,CAAC;AAED9B,QAAQ,CAAC+B,MAAM,GAAGC,iBAAK,CAACD,MAAM;AAC9B/B,QAAQ,CAACiC,KAAK,GAAGD,iBAAK,CAACC,KAAK;AAC5BjC,QAAQ,CAACkC,QAAQ,GAAGF,iBAAK,CAACE,QAAQ;AAClClC,QAAQ,CAACmC,QAAQ,GAAGA,oBAAQ;AAAC,eAEdnC,QAAQ;AAAA"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/lib/input/style/css");
4
-
5
4
  require("./index.css");
6
5
  //# sourceMappingURL=css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
1
+ {"version":3,"file":"css.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA"}
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  require("antd/lib/input/style");
4
-
5
4
  require("./index.less");
6
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;;AACA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["vtx-input/style/index.js"],"sourcesContent":["import 'antd/lib/input/style';\nimport './index.less';\n"],"mappings":";;AAAA;AACA"}
@@ -4,38 +4,26 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _react = require("react");
9
-
10
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
-
12
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
13
-
14
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
-
16
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
-
18
12
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
19
-
20
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
-
22
14
  var useLength = function useLength() {
23
15
  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
24
-
25
16
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
26
- showCount = _ref.showCount;
27
-
17
+ showCount = _ref.showCount;
28
18
  var _useState = (0, _react.useState)(0),
29
- _useState2 = _slicedToArray(_useState, 2),
30
- len = _useState2[0],
31
- setLen = _useState2[1];
32
-
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ len = _useState2[0],
21
+ setLen = _useState2[1];
33
22
  (0, _react.useEffect)(function () {
34
23
  showCount && setLen(String(val !== null && val !== void 0 ? val : '').length);
35
24
  }, [val]);
36
25
  return len;
37
26
  };
38
-
39
27
  var _default = useLength;
40
28
  exports["default"] = _default;
41
29
  //# sourceMappingURL=useLength.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLength.js","names":["useLength","val","showCount","useState","len","setLen","useEffect","String","length"],"sources":["vtx-input/useLength.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useLength = (val = '', { showCount } = {}) => {\n const [len, setLen] = useState(0);\n useEffect(() => {\n showCount && setLen(String(val ?? '').length);\n }, [val]);\n return len;\n};\n\nexport default useLength;\n"],"mappings":";;;;;;;AAAA;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,SAAZA,SAAY,GAAkC;EAAA,IAAjCC,GAAiC,uEAA3B,EAA2B;;EAAA,+EAAP,EAAO;EAAA,IAArBC,SAAqB,QAArBA,SAAqB;;EAChD,gBAAsB,IAAAC,eAAA,EAAS,CAAT,CAAtB;EAAA;EAAA,IAAOC,GAAP;EAAA,IAAYC,MAAZ;;EACA,IAAAC,gBAAA,EAAU,YAAM;IACZJ,SAAS,IAAIG,MAAM,CAACE,MAAM,CAACN,GAAD,aAACA,GAAD,cAACA,GAAD,GAAQ,EAAR,CAAN,CAAkBO,MAAnB,CAAnB;EACH,CAFD,EAEG,CAACP,GAAD,CAFH;EAGA,OAAOG,GAAP;AACH,CAND;;eAQeJ,S"}
1
+ {"version":3,"file":"useLength.js","names":["useLength","val","showCount","useState","len","setLen","useEffect","String","length"],"sources":["vtx-input/useLength.js"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useLength = (val = '', { showCount } = {}) => {\n const [len, setLen] = useState(0);\n useEffect(() => {\n showCount && setLen(String(val ?? '').length);\n }, [val]);\n return len;\n};\n\nexport default useLength;\n"],"mappings":";;;;;;AAAA;AAA4C;AAAA;AAAA;AAAA;AAAA;AAAA;AAE5C,IAAMA,SAAS,GAAG,SAAZA,SAAS,GAAqC;EAAA,IAAjCC,GAAG,uEAAG,EAAE;EAAA,+EAAkB,CAAC,CAAC;IAAhBC,SAAS,QAATA,SAAS;EACpC,gBAAsB,IAAAC,eAAQ,EAAC,CAAC,CAAC;IAAA;IAA1BC,GAAG;IAAEC,MAAM;EAClB,IAAAC,gBAAS,EAAC,YAAM;IACZJ,SAAS,IAAIG,MAAM,CAACE,MAAM,CAACN,GAAG,aAAHA,GAAG,cAAHA,GAAG,GAAI,EAAE,CAAC,CAACO,MAAM,CAAC;EACjD,CAAC,EAAE,CAACP,GAAG,CAAC,CAAC;EACT,OAAOG,GAAG;AACd,CAAC;AAAC,eAEaJ,SAAS;AAAA"}
@@ -4,16 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
-
8
7
  var _react = _interopRequireDefault(require("react"));
9
-
10
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
11
-
12
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
-
14
10
  function Title(props) {
15
11
  var text = props.text,
16
- subtitle = props.subtitle;
12
+ subtitle = props.subtitle;
17
13
  return /*#__PURE__*/_react["default"].createElement("div", {
18
14
  className: "vtx-modal-header-title"
19
15
  }, /*#__PURE__*/_react["default"].createElement("span", {
@@ -22,7 +18,6 @@ function Title(props) {
22
18
  className: "vtx-modal-header-subtitle"
23
19
  }, subtitle));
24
20
  }
25
-
26
21
  Title.propTypes = {
27
22
  text: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
28
23
  subtitle: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node])
@@ -1 +1 @@
1
- {"version":3,"file":"Title.js","names":["Title","props","text","subtitle","propTypes","PropTypes","oneOfType","string","node"],"sources":["vtx-modal/Title.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction Title(props) {\n const { text, subtitle } = props;\n return (\n <div className=\"vtx-modal-header-title\">\n <span className=\"vtx-modal-header-text\">{text}</span>\n {subtitle && <span className=\"vtx-modal-header-subtitle\">{subtitle}</span>}\n </div>\n );\n}\n\nTitle.propTypes = {\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n};\n\nexport default Title;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,SAASA,KAAT,CAAeC,KAAf,EAAsB;EAClB,IAAQC,IAAR,GAA2BD,KAA3B,CAAQC,IAAR;EAAA,IAAcC,QAAd,GAA2BF,KAA3B,CAAcE,QAAd;EACA,oBACI;IAAK,SAAS,EAAC;EAAf,gBACI;IAAM,SAAS,EAAC;EAAhB,GAAyCD,IAAzC,CADJ,EAEKC,QAAQ,iBAAI;IAAM,SAAS,EAAC;EAAhB,GAA6CA,QAA7C,CAFjB,CADJ;AAMH;;AAEDH,KAAK,CAACI,SAAN,GAAkB;EACdF,IAAI,EAAEG,qBAAA,CAAUC,SAAV,CAAoB,CAACD,qBAAA,CAAUE,MAAX,EAAmBF,qBAAA,CAAUG,IAA7B,CAApB,CADQ;EAEdL,QAAQ,EAAEE,qBAAA,CAAUC,SAAV,CAAoB,CAACD,qBAAA,CAAUE,MAAX,EAAmBF,qBAAA,CAAUG,IAA7B,CAApB;AAFI,CAAlB;eAKeR,K"}
1
+ {"version":3,"file":"Title.js","names":["Title","props","text","subtitle","propTypes","PropTypes","oneOfType","string","node"],"sources":["vtx-modal/Title.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\n\nfunction Title(props) {\n const { text, subtitle } = props;\n return (\n <div className=\"vtx-modal-header-title\">\n <span className=\"vtx-modal-header-text\">{text}</span>\n {subtitle && <span className=\"vtx-modal-header-subtitle\">{subtitle}</span>}\n </div>\n );\n}\n\nTitle.propTypes = {\n text: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n};\n\nexport default Title;\n"],"mappings":";;;;;;AAAA;AACA;AAAmC;AAEnC,SAASA,KAAK,CAACC,KAAK,EAAE;EAClB,IAAQC,IAAI,GAAeD,KAAK,CAAxBC,IAAI;IAAEC,QAAQ,GAAKF,KAAK,CAAlBE,QAAQ;EACtB,oBACI;IAAK,SAAS,EAAC;EAAwB,gBACnC;IAAM,SAAS,EAAC;EAAuB,GAAED,IAAI,CAAQ,EACpDC,QAAQ,iBAAI;IAAM,SAAS,EAAC;EAA2B,GAAEA,QAAQ,CAAQ,CACxE;AAEd;AAEAH,KAAK,CAACI,SAAS,GAAG;EACdF,IAAI,EAAEG,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,IAAI,CAAC,CAAC;EAC7DL,QAAQ,EAAEE,qBAAS,CAACC,SAAS,CAAC,CAACD,qBAAS,CAACE,MAAM,EAAEF,qBAAS,CAACG,IAAI,CAAC;AACpE,CAAC;AAAC,eAEaR,KAAK;AAAA"}
@@ -1,56 +1,32 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = void 0;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
-
14
10
  var _useUpdateEffect = _interopRequireDefault(require("ahooks/es/useUpdateEffect"));
15
-
16
11
  var _useSetState5 = _interopRequireDefault(require("ahooks/es/useSetState"));
17
-
18
12
  var _CloseOutlined = _interopRequireDefault(require("@ant-design/icons/CloseOutlined"));
19
-
20
13
  var _FullscreenExitOutlined = _interopRequireDefault(require("@ant-design/icons/FullscreenExitOutlined"));
21
-
22
14
  var _FullscreenOutlined = _interopRequireDefault(require("@ant-design/icons/FullscreenOutlined"));
23
-
24
15
  var _classnames = _interopRequireDefault(require("classnames"));
25
-
26
16
  var _modal = _interopRequireDefault(require("antd/lib/modal"));
27
-
28
17
  var _Title = _interopRequireDefault(require("./Title"));
29
-
30
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
-
32
19
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
-
34
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
35
-
36
21
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
-
38
22
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
-
40
23
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
41
-
42
24
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
43
-
44
25
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
45
-
46
26
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
47
-
48
27
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
49
-
50
28
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
51
-
52
29
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
-
54
30
  // 对话框位置初始参数
55
31
  var initDragArg = {
56
32
  init_x: 0,
@@ -59,39 +35,36 @@ var initDragArg = {
59
35
  y_move: 0,
60
36
  documentMouseMove: null,
61
37
  documentMouseUp: null
62
- }; // 全屏参数
38
+ };
63
39
 
40
+ // 全屏参数
64
41
  var initFullScreen = {
65
42
  isFull: false,
66
43
  className: ''
67
44
  };
68
-
69
45
  function VtxModal(props) {
70
46
  var _useSetState = (0, _useSetState5["default"])(initFullScreen),
71
- _useSetState2 = _slicedToArray(_useSetState, 2),
72
- fullScreen = _useSetState2[0],
73
- setFullScreen = _useSetState2[1]; // 是否是全屏状态
74
-
75
-
47
+ _useSetState2 = _slicedToArray(_useSetState, 2),
48
+ fullScreen = _useSetState2[0],
49
+ setFullScreen = _useSetState2[1]; // 是否是全屏状态
76
50
  var _useSetState3 = (0, _useSetState5["default"])(initDragArg),
77
- _useSetState4 = _slicedToArray(_useSetState3, 2),
78
- dragArg = _useSetState4[0],
79
- setDragArg = _useSetState4[1]; // 拖动配置
80
-
81
-
51
+ _useSetState4 = _slicedToArray(_useSetState3, 2),
52
+ dragArg = _useSetState4[0],
53
+ setDragArg = _useSetState4[1]; // 拖动配置
82
54
  var classId = (0, _react.useRef)(new Date().getTime() + Math.random());
83
55
  var _props$wrapClassName = props.wrapClassName,
84
- wrapClassName = _props$wrapClassName === void 0 ? '' : _props$wrapClassName,
85
- _props$closable = props.closable,
86
- closable = _props$closable === void 0 ? true : _props$closable,
87
- _props$title = props.title,
88
- title = _props$title === void 0 ? '' : _props$title,
89
- _props$maximize = props.maximize,
90
- maximize = _props$maximize === void 0 ? false : _props$maximize,
91
- onModalResize = props.onModalResize,
92
- _props$moveable = props.moveable,
93
- moveable = _props$moveable === void 0 ? false : _props$moveable; // 监听对话框大小变化回调(忽略首次执行)
94
-
56
+ wrapClassName = _props$wrapClassName === void 0 ? '' : _props$wrapClassName,
57
+ _props$closable = props.closable,
58
+ closable = _props$closable === void 0 ? true : _props$closable,
59
+ _props$title = props.title,
60
+ title = _props$title === void 0 ? '' : _props$title,
61
+ _props$maximize = props.maximize,
62
+ maximize = _props$maximize === void 0 ? false : _props$maximize,
63
+ onModalResize = props.onModalResize,
64
+ _props$moveable = props.moveable,
65
+ moveable = _props$moveable === void 0 ? false : _props$moveable;
66
+
67
+ // 监听对话框大小变化回调(忽略首次执行)
95
68
  (0, _useUpdateEffect["default"])(function () {
96
69
  var timer = setTimeout(function () {
97
70
  if (onModalResize && typeof onModalResize === 'function') {
@@ -106,15 +79,14 @@ function VtxModal(props) {
106
79
  return function () {
107
80
  return clearTimeout(timer);
108
81
  };
109
- }, [fullScreen.isFull]); // 拖拽
82
+ }, [fullScreen.isFull]);
110
83
 
84
+ // 拖拽
111
85
  (0, _react.useEffect)(function () {
112
86
  if (props.visible && moveable) {
113
87
  var timer = setTimeout(function () {
114
88
  var _document$getElements, _document$getElements2, _document$getElements3;
115
-
116
89
  var modalHead = (_document$getElements = document.getElementsByClassName(classId.current)) === null || _document$getElements === void 0 ? void 0 : (_document$getElements2 = _document$getElements[0]) === null || _document$getElements2 === void 0 ? void 0 : (_document$getElements3 = _document$getElements2.getElementsByClassName('ant-modal-header')) === null || _document$getElements3 === void 0 ? void 0 : _document$getElements3[0];
117
-
118
90
  if (modalHead) {
119
91
  modalHead.style.cursor = 'move';
120
92
  modalHead.onmousedown = startDrag;
@@ -125,10 +97,9 @@ function VtxModal(props) {
125
97
  };
126
98
  }
127
99
  });
128
-
129
100
  var startDrag = function startDrag(e) {
130
- e.preventDefault(); // 全屏模式下禁止拖拽
131
-
101
+ e.preventDefault();
102
+ // 全屏模式下禁止拖拽
132
103
  if (!fullScreen.isFull) {
133
104
  setDragArg({
134
105
  documentMouseUp: document.onmouseup,
@@ -136,7 +107,6 @@ function VtxModal(props) {
136
107
  init_x: e.clientX - dragArg.x_move,
137
108
  init_y: e.clientY - dragArg.y_move
138
109
  });
139
-
140
110
  document.onmousemove = function (e) {
141
111
  setDragArg(function (prev) {
142
112
  return {
@@ -145,28 +115,26 @@ function VtxModal(props) {
145
115
  };
146
116
  });
147
117
  };
148
-
149
118
  document.onmouseup = function () {
150
119
  document.onmousemove = dragArg.documentMouseMove;
151
120
  document.onmouseup = dragArg.documentMouseUp;
152
121
  };
153
122
  }
154
- }; // 关闭对话框,初始化位置
155
-
123
+ };
156
124
 
125
+ // 关闭对话框,初始化位置
157
126
  var onCancel = function onCancel() {
158
127
  if (props.onCancel && typeof props.onCancel === 'function') {
159
- props.onCancel(); // TODO 关闭弹框会闪一下,待解决
160
-
128
+ props.onCancel();
129
+ // TODO 关闭弹框会闪一下,待解决
161
130
  setDragArg(initDragArg);
162
131
  setFullScreen(initFullScreen);
163
132
  }
164
133
  };
134
+
165
135
  /*
166
136
  *重写title,加入对话框全屏功能
167
137
  */
168
-
169
-
170
138
  title = function renderTitle() {
171
139
  return /*#__PURE__*/_react["default"].createElement("div", {
172
140
  className: "vtx-modal-title",
@@ -180,11 +148,9 @@ function VtxModal(props) {
180
148
  }, /*#__PURE__*/_react["default"].createElement("p", {
181
149
  onClick: function onClick() {
182
150
  var fullScreenClass = '';
183
-
184
151
  if (!fullScreen.isFull) {
185
152
  fullScreenClass = 'vtx-modal-maxClass';
186
153
  }
187
-
188
154
  setFullScreen({
189
155
  isFull: !fullScreen.isFull,
190
156
  className: fullScreenClass
@@ -196,21 +162,17 @@ function VtxModal(props) {
196
162
  onClick: onCancel
197
163
  }, /*#__PURE__*/_react["default"].createElement(_CloseOutlined["default"], null))) : '');
198
164
  }();
199
-
200
165
  var bodyStyle = _objectSpread({}, props.bodyStyle);
201
- /* 限制最大高度 */
202
-
203
166
 
167
+ /* 限制最大高度 */
204
168
  if (!fullScreen.isFull) {
205
169
  bodyStyle = _objectSpread({
206
170
  maxHeight: "".concat(window.innerHeight * 0.7, "px")
207
171
  }, bodyStyle);
208
172
  }
209
-
210
173
  var transformStyle = {
211
174
  transform: "translate(".concat(dragArg.x_move, "px,").concat(dragArg.y_move, "px)")
212
175
  };
213
-
214
176
  var newProps = _objectSpread(_objectSpread({
215
177
  maskClosable: false,
216
178
  destroyOnClose: true,
@@ -223,10 +185,8 @@ function VtxModal(props) {
223
185
  onCancel: onCancel,
224
186
  style: _objectSpread(_objectSpread({}, props.style), fullScreen.isFull ? {} : transformStyle)
225
187
  });
226
-
227
188
  return /*#__PURE__*/_react["default"].createElement(_modal["default"], newProps, props.children);
228
189
  }
229
-
230
190
  VtxModal.info = _modal["default"].info;
231
191
  VtxModal.success = _modal["default"].success;
232
192
  VtxModal.error = _modal["default"].error;