@vtx/components 3.1.127 → 3.1.128

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 (309) hide show
  1. package/lib/_util/filterSpecialCharacters.js +60 -49
  2. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  3. package/lib/_util/getComponentProps.js +1 -4
  4. package/lib/_util/getComponentProps.js.map +1 -1
  5. package/lib/_util/getToken.js +8 -16
  6. package/lib/_util/getToken.js.map +1 -1
  7. package/lib/_util/getUrlParam.js +2 -9
  8. package/lib/_util/getUrlParam.js.map +1 -1
  9. package/lib/_util/isFunction.js +0 -1
  10. package/lib/_util/isFunction.js.map +1 -1
  11. package/lib/_util/isObject.js +0 -1
  12. package/lib/_util/isObject.js.map +1 -1
  13. package/lib/_util/useColSize.js +3 -13
  14. package/lib/_util/useColSize.js.map +1 -1
  15. package/lib/_util/useInterval.js +0 -3
  16. package/lib/_util/useInterval.js.map +1 -1
  17. package/lib/_util/useSet.js +26 -42
  18. package/lib/_util/useSet.js.map +1 -1
  19. package/lib/config.js +1 -2
  20. package/lib/config.js.map +1 -1
  21. package/lib/index.js +1 -30
  22. package/lib/index.js.map +1 -1
  23. package/lib/style/index.less +2 -2
  24. package/lib/style/themes/compact.less +1 -1
  25. package/lib/style/themes/dark.less +9 -9
  26. package/lib/style/themes/default.less +7 -7
  27. package/lib/style/themes/index.less +1 -1
  28. package/lib/style/themes/variable.less +5 -5
  29. package/lib/vtx-color-picker/index.js +14 -33
  30. package/lib/vtx-color-picker/index.js.map +1 -1
  31. package/lib/vtx-color-picker/style/css.js +0 -2
  32. package/lib/vtx-color-picker/style/css.js.map +1 -1
  33. package/lib/vtx-color-picker/style/index.js +0 -2
  34. package/lib/vtx-color-picker/style/index.js.map +1 -1
  35. package/lib/vtx-combogrid/Combogrid.js +55 -96
  36. package/lib/vtx-combogrid/Combogrid.js.map +1 -1
  37. package/lib/vtx-combogrid/index.js +41 -66
  38. package/lib/vtx-combogrid/index.js.map +1 -1
  39. package/lib/vtx-combogrid/style/css.js +0 -7
  40. package/lib/vtx-combogrid/style/css.js.map +1 -1
  41. package/lib/vtx-combogrid/style/index.js +0 -7
  42. package/lib/vtx-combogrid/style/index.js.map +1 -1
  43. package/lib/vtx-datagrid/Alert.js +6 -15
  44. package/lib/vtx-datagrid/Alert.js.map +1 -1
  45. package/lib/vtx-datagrid/ColumnSetting.js +49 -89
  46. package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
  47. package/lib/vtx-datagrid/ResizeableTitle.js +6 -18
  48. package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
  49. package/lib/vtx-datagrid/index.js +132 -205
  50. package/lib/vtx-datagrid/index.js.map +1 -1
  51. package/lib/vtx-datagrid/renderColumnButtons.js +15 -46
  52. package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
  53. package/lib/vtx-datagrid/style/css.js +0 -10
  54. package/lib/vtx-datagrid/style/css.js.map +1 -1
  55. package/lib/vtx-datagrid/style/index.js +0 -10
  56. package/lib/vtx-datagrid/style/index.js.map +1 -1
  57. package/lib/vtx-date-picker/QdatePicker.js +28 -58
  58. package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
  59. package/lib/vtx-date-picker/generatePicker.js +35 -77
  60. package/lib/vtx-date-picker/generatePicker.js.map +1 -1
  61. package/lib/vtx-date-picker/index.js +2 -8
  62. package/lib/vtx-date-picker/index.js.map +1 -1
  63. package/lib/vtx-date-picker/style/css.js +0 -1
  64. package/lib/vtx-date-picker/style/css.js.map +1 -1
  65. package/lib/vtx-date-picker/style/index.js +0 -1
  66. package/lib/vtx-date-picker/style/index.js.map +1 -1
  67. package/lib/vtx-date-picker/style/index.less +39 -39
  68. package/lib/vtx-editor/index.js +13 -32
  69. package/lib/vtx-editor/index.js.map +1 -1
  70. package/lib/vtx-editor/style/css.js +0 -1
  71. package/lib/vtx-editor/style/css.js.map +1 -1
  72. package/lib/vtx-editor/style/index.js +0 -1
  73. package/lib/vtx-editor/style/index.js.map +1 -1
  74. package/lib/vtx-editor/style/index.less +8 -8
  75. package/lib/vtx-ellipsis-text/index.js +16 -29
  76. package/lib/vtx-ellipsis-text/index.js.map +1 -1
  77. package/lib/vtx-ellipsis-text/style/css.js +0 -1
  78. package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
  79. package/lib/vtx-ellipsis-text/style/index.js +0 -1
  80. package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
  81. package/lib/vtx-ellipsis-text/style/index.less +13 -13
  82. package/lib/vtx-export/index.js +38 -73
  83. package/lib/vtx-export/index.js.map +1 -1
  84. package/lib/vtx-export/style/css.js +0 -5
  85. package/lib/vtx-export/style/css.js.map +1 -1
  86. package/lib/vtx-export/style/index.js +0 -5
  87. package/lib/vtx-export/style/index.js.map +1 -1
  88. package/lib/vtx-export-async/History.js +75 -117
  89. package/lib/vtx-export-async/History.js.map +1 -1
  90. package/lib/vtx-export-async/index.js +80 -121
  91. package/lib/vtx-export-async/index.js.map +1 -1
  92. package/lib/vtx-export-async/style/css.js.map +1 -1
  93. package/lib/vtx-export-async/style/index.js.map +1 -1
  94. package/lib/vtx-export-async/util.js +9 -21
  95. package/lib/vtx-export-async/util.js.map +1 -1
  96. package/lib/vtx-form-layout/Card.js +17 -39
  97. package/lib/vtx-form-layout/Card.js.map +1 -1
  98. package/lib/vtx-form-layout/Divider.js +6 -12
  99. package/lib/vtx-form-layout/Divider.js.map +1 -1
  100. package/lib/vtx-form-layout/FormItem.js +16 -38
  101. package/lib/vtx-form-layout/FormItem.js.map +1 -1
  102. package/lib/vtx-form-layout/Pane.js +4 -10
  103. package/lib/vtx-form-layout/Pane.js.map +1 -1
  104. package/lib/vtx-form-layout/Row.js +2 -9
  105. package/lib/vtx-form-layout/Row.js.map +1 -1
  106. package/lib/vtx-form-layout/context.js +1 -4
  107. package/lib/vtx-form-layout/context.js.map +1 -1
  108. package/lib/vtx-form-layout/demo/Modal.less +43 -43
  109. package/lib/vtx-form-layout/index.js +10 -25
  110. package/lib/vtx-form-layout/index.js.map +1 -1
  111. package/lib/vtx-form-layout/style/css.js +0 -7
  112. package/lib/vtx-form-layout/style/css.js.map +1 -1
  113. package/lib/vtx-form-layout/style/index.js +0 -7
  114. package/lib/vtx-form-layout/style/index.js.map +1 -1
  115. package/lib/vtx-form-layout/style/index.less +220 -220
  116. package/lib/vtx-image/Image.js +77 -117
  117. package/lib/vtx-image/Image.js.map +1 -1
  118. package/lib/vtx-image/Preview.js +34 -63
  119. package/lib/vtx-image/Preview.js.map +1 -1
  120. package/lib/vtx-image/PreviewGroup.js +24 -54
  121. package/lib/vtx-image/PreviewGroup.js.map +1 -1
  122. package/lib/vtx-image/index.js +4 -11
  123. package/lib/vtx-image/index.js.map +1 -1
  124. package/lib/vtx-image/style/css.js +0 -1
  125. package/lib/vtx-image/style/css.js.map +1 -1
  126. package/lib/vtx-image/style/index.js +0 -1
  127. package/lib/vtx-image/style/index.js.map +1 -1
  128. package/lib/vtx-import/index.js +49 -82
  129. package/lib/vtx-import/index.js.map +1 -1
  130. package/lib/vtx-import/result.js +15 -33
  131. package/lib/vtx-import/result.js.map +1 -1
  132. package/lib/vtx-import/style/css.js +0 -3
  133. package/lib/vtx-import/style/css.js.map +1 -1
  134. package/lib/vtx-import/style/index.js +0 -3
  135. package/lib/vtx-import/style/index.js.map +1 -1
  136. package/lib/vtx-import/style/index.less +8 -8
  137. package/lib/vtx-import2/CheckResult.js +2 -9
  138. package/lib/vtx-import2/CheckResult.js.map +1 -1
  139. package/lib/vtx-import2/Content.js +16 -38
  140. package/lib/vtx-import2/Content.js.map +1 -1
  141. package/lib/vtx-import2/DownloadSvg.js +2 -7
  142. package/lib/vtx-import2/DownloadSvg.js.map +1 -1
  143. package/lib/vtx-import2/ImportResult.js +8 -15
  144. package/lib/vtx-import2/ImportResult.js.map +1 -1
  145. package/lib/vtx-import2/UploadSvg.js +2 -7
  146. package/lib/vtx-import2/UploadSvg.js.map +1 -1
  147. package/lib/vtx-import2/index.js +58 -117
  148. package/lib/vtx-import2/index.js.map +1 -1
  149. package/lib/vtx-import2/style/css.js +0 -3
  150. package/lib/vtx-import2/style/css.js.map +1 -1
  151. package/lib/vtx-import2/style/index.js +0 -3
  152. package/lib/vtx-import2/style/index.js.map +1 -1
  153. package/lib/vtx-import2/style/index.less +102 -102
  154. package/lib/vtx-input/TextArea.js +14 -31
  155. package/lib/vtx-input/TextArea.js.map +1 -1
  156. package/lib/vtx-input/index.js +24 -49
  157. package/lib/vtx-input/index.js.map +1 -1
  158. package/lib/vtx-input/style/css.js +0 -1
  159. package/lib/vtx-input/style/css.js.map +1 -1
  160. package/lib/vtx-input/style/index.js +0 -1
  161. package/lib/vtx-input/style/index.js.map +1 -1
  162. package/lib/vtx-input/style/index.less +24 -24
  163. package/lib/vtx-input/useLength.js +10 -23
  164. package/lib/vtx-input/useLength.js.map +1 -1
  165. package/lib/vtx-modal/Title.js +3 -9
  166. package/lib/vtx-modal/Title.js.map +1 -1
  167. package/lib/vtx-modal/index.js +52 -85
  168. package/lib/vtx-modal/index.js.map +1 -1
  169. package/lib/vtx-modal/style/css.js +0 -1
  170. package/lib/vtx-modal/style/css.js.map +1 -1
  171. package/lib/vtx-modal/style/index.js +0 -1
  172. package/lib/vtx-modal/style/index.js.map +1 -1
  173. package/lib/vtx-page-layout/Basic.js +4 -9
  174. package/lib/vtx-page-layout/Basic.js.map +1 -1
  175. package/lib/vtx-page-layout/Content.js +16 -27
  176. package/lib/vtx-page-layout/Content.js.map +1 -1
  177. package/lib/vtx-page-layout/Pane.js +4 -13
  178. package/lib/vtx-page-layout/Pane.js.map +1 -1
  179. package/lib/vtx-page-layout/TableLayout.js +34 -64
  180. package/lib/vtx-page-layout/TableLayout.js.map +1 -1
  181. package/lib/vtx-page-layout/TableWrap.js +12 -23
  182. package/lib/vtx-page-layout/TableWrap.js.map +1 -1
  183. package/lib/vtx-page-layout/container.js +32 -61
  184. package/lib/vtx-page-layout/container.js.map +1 -1
  185. package/lib/vtx-page-layout/index.js +2 -11
  186. package/lib/vtx-page-layout/index.js.map +1 -1
  187. package/lib/vtx-page-layout/style/css.js.map +1 -1
  188. package/lib/vtx-page-layout/style/index.js.map +1 -1
  189. package/lib/vtx-page-layout/style/index.less +138 -138
  190. package/lib/vtx-rps-frame/index.js +38 -58
  191. package/lib/vtx-rps-frame/index.js.map +1 -1
  192. package/lib/vtx-rps-frame/style/css.js.map +1 -1
  193. package/lib/vtx-rps-frame/style/index.js.map +1 -1
  194. package/lib/vtx-scrollable-row/index.js +34 -68
  195. package/lib/vtx-scrollable-row/index.js.map +1 -1
  196. package/lib/vtx-scrollable-row/style/css.js.map +1 -1
  197. package/lib/vtx-scrollable-row/style/index.js.map +1 -1
  198. package/lib/vtx-scrollable-row/style/index.less +113 -113
  199. package/lib/vtx-search/VtxCol.js +8 -27
  200. package/lib/vtx-search/VtxCol.js.map +1 -1
  201. package/lib/vtx-search/VtxRow.js +8 -15
  202. package/lib/vtx-search/VtxRow.js.map +1 -1
  203. package/lib/vtx-search/index.js +67 -112
  204. package/lib/vtx-search/index.js.map +1 -1
  205. package/lib/vtx-search/style/css.js +0 -4
  206. package/lib/vtx-search/style/css.js.map +1 -1
  207. package/lib/vtx-search/style/index.js +0 -4
  208. package/lib/vtx-search/style/index.js.map +1 -1
  209. package/lib/vtx-search-map-input/index.js +63 -98
  210. package/lib/vtx-search-map-input/index.js.map +1 -1
  211. package/lib/vtx-search-map-input/style/css.js +0 -2
  212. package/lib/vtx-search-map-input/style/css.js.map +1 -1
  213. package/lib/vtx-search-map-input/style/index.js +0 -2
  214. package/lib/vtx-search-map-input/style/index.js.map +1 -1
  215. package/lib/vtx-select/index.js +47 -99
  216. package/lib/vtx-select/index.js.map +1 -1
  217. package/lib/vtx-select/style/css.js +0 -8
  218. package/lib/vtx-select/style/css.js.map +1 -1
  219. package/lib/vtx-select/style/index.js +0 -8
  220. package/lib/vtx-select/style/index.js.map +1 -1
  221. package/lib/vtx-select/style/index.less +68 -68
  222. package/lib/vtx-signature/index.js +19 -34
  223. package/lib/vtx-signature/index.js.map +1 -1
  224. package/lib/vtx-signature/style/css.js +0 -2
  225. package/lib/vtx-signature/style/css.js.map +1 -1
  226. package/lib/vtx-signature/style/index.js +0 -2
  227. package/lib/vtx-signature/style/index.js.map +1 -1
  228. package/lib/vtx-signature/style/index.less +33 -33
  229. package/lib/vtx-split-pane/Pane.js +12 -23
  230. package/lib/vtx-split-pane/Pane.js.map +1 -1
  231. package/lib/vtx-split-pane/Resizer.js +21 -41
  232. package/lib/vtx-split-pane/Resizer.js.map +1 -1
  233. package/lib/vtx-split-pane/SplitPane.js +55 -111
  234. package/lib/vtx-split-pane/SplitPane.js.map +1 -1
  235. package/lib/vtx-split-pane/index.js +2 -7
  236. package/lib/vtx-split-pane/index.js.map +1 -1
  237. package/lib/vtx-split-pane/style/css.js +0 -3
  238. package/lib/vtx-split-pane/style/css.js.map +1 -1
  239. package/lib/vtx-split-pane/style/index.js +0 -3
  240. package/lib/vtx-split-pane/style/index.js.map +1 -1
  241. package/lib/vtx-split-pane/style/index.less +76 -76
  242. package/lib/vtx-statistics-column/Back.js +4 -11
  243. package/lib/vtx-statistics-column/Back.js.map +1 -1
  244. package/lib/vtx-statistics-column/Item.js +16 -32
  245. package/lib/vtx-statistics-column/Item.js.map +1 -1
  246. package/lib/vtx-statistics-column/Total.js +15 -31
  247. package/lib/vtx-statistics-column/Total.js.map +1 -1
  248. package/lib/vtx-statistics-column/context.js +1 -4
  249. package/lib/vtx-statistics-column/context.js.map +1 -1
  250. package/lib/vtx-statistics-column/index.js +2 -19
  251. package/lib/vtx-statistics-column/index.js.map +1 -1
  252. package/lib/vtx-statistics-column/style/css.js +0 -1
  253. package/lib/vtx-statistics-column/style/css.js.map +1 -1
  254. package/lib/vtx-statistics-column/style/index.js +0 -1
  255. package/lib/vtx-statistics-column/style/index.js.map +1 -1
  256. package/lib/vtx-statistics-column/style/index.less +59 -59
  257. package/lib/vtx-time-picker/index.js +8 -22
  258. package/lib/vtx-time-picker/index.js.map +1 -1
  259. package/lib/vtx-time-picker/style/css.js.map +1 -1
  260. package/lib/vtx-time-picker/style/index.js.map +1 -1
  261. package/lib/vtx-tree/index.js +141 -182
  262. package/lib/vtx-tree/index.js.map +1 -1
  263. package/lib/vtx-tree/style/css.js +0 -2
  264. package/lib/vtx-tree/style/css.js.map +1 -1
  265. package/lib/vtx-tree/style/index.css +1 -1
  266. package/lib/vtx-tree/style/index.js +0 -2
  267. package/lib/vtx-tree/style/index.js.map +1 -1
  268. package/lib/vtx-tree/style/index.less +54 -54
  269. package/lib/vtx-tree/utils.js +10 -31
  270. package/lib/vtx-tree/utils.js.map +1 -1
  271. package/lib/vtx-tree-select/index.js +37 -81
  272. package/lib/vtx-tree-select/index.js.map +1 -1
  273. package/lib/vtx-tree-select/style/css.js +0 -4
  274. package/lib/vtx-tree-select/style/css.js.map +1 -1
  275. package/lib/vtx-tree-select/style/index.js +0 -4
  276. package/lib/vtx-tree-select/style/index.js.map +1 -1
  277. package/lib/vtx-upload/FilePreview.js +16 -34
  278. package/lib/vtx-upload/FilePreview.js.map +1 -1
  279. package/lib/vtx-upload/index.js +89 -166
  280. package/lib/vtx-upload/index.js.map +1 -1
  281. package/lib/vtx-upload/style/css.js +0 -6
  282. package/lib/vtx-upload/style/css.js.map +1 -1
  283. package/lib/vtx-upload/style/index.js +0 -6
  284. package/lib/vtx-upload/style/index.js.map +1 -1
  285. package/lib/vtx-upload/style/index.less +61 -61
  286. package/lib/vtx-wang-editor/index.js +84 -126
  287. package/lib/vtx-wang-editor/index.js.map +1 -1
  288. package/lib/vtx-wang-editor/style/css.js +0 -1
  289. package/lib/vtx-wang-editor/style/css.js.map +1 -1
  290. package/lib/vtx-wang-editor/style/index.js +0 -1
  291. package/lib/vtx-wang-editor/style/index.js.map +1 -1
  292. package/lib/vtx-wang-editor/style/index.less +12 -12
  293. package/lib/vtx-wang-editor/wangEditorUtil.js +80 -141
  294. package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
  295. package/lib/vtx-ztree/index.js +77 -133
  296. package/lib/vtx-ztree/index.js.map +1 -1
  297. package/lib/vtx-ztree/style/css.js +0 -1
  298. package/lib/vtx-ztree/style/css.js.map +1 -1
  299. package/lib/vtx-ztree/style/index.js +0 -1
  300. package/lib/vtx-ztree/style/index.js.map +1 -1
  301. package/lib/vtx-ztree/style/index.less +45 -45
  302. package/lib/vtx-ztree-select/index.js +91 -159
  303. package/lib/vtx-ztree-select/index.js.map +1 -1
  304. package/lib/vtx-ztree-select/style/css.js +0 -3
  305. package/lib/vtx-ztree-select/style/css.js.map +1 -1
  306. package/lib/vtx-ztree-select/style/index.js +0 -3
  307. package/lib/vtx-ztree-select/style/index.js.map +1 -1
  308. package/lib/vtx-ztree-select/style/index.less +109 -109
  309. package/package.json +122 -122
@@ -1,178 +1,133 @@
1
1
  "use strict";
2
2
 
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
-
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports["default"] = VtxDatagrid;
9
-
10
8
  var _react = _interopRequireWildcard(require("react"));
11
-
12
9
  var _classnames2 = _interopRequireDefault(require("classnames"));
13
-
14
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
-
16
11
  var _table = _interopRequireDefault(require("antd/lib/table"));
17
-
18
12
  var _tooltip = _interopRequireDefault(require("antd/lib/tooltip"));
19
-
20
13
  var _dropdown = _interopRequireDefault(require("antd/lib/dropdown"));
21
-
22
14
  var _menu = _interopRequireDefault(require("antd/lib/menu"));
23
-
24
15
  var _empty = _interopRequireDefault(require("antd/lib/empty"));
25
-
26
16
  var _RedoOutlined = _interopRequireDefault(require("@ant-design/icons/RedoOutlined"));
27
-
28
17
  var _ColumnHeightOutlined = _interopRequireDefault(require("@ant-design/icons/ColumnHeightOutlined"));
29
-
30
18
  var _SettingOutlined = _interopRequireDefault(require("@ant-design/icons/SettingOutlined"));
31
-
32
19
  var _Alert = _interopRequireDefault(require("./Alert"));
33
-
34
20
  var _ColumnSetting = _interopRequireDefault(require("./ColumnSetting"));
35
-
36
21
  var _ResizeableTitle = _interopRequireDefault(require("./ResizeableTitle"));
37
-
38
22
  var _renderColumnButtons = _interopRequireDefault(require("./renderColumnButtons"));
39
-
40
23
  var _useSet3 = _interopRequireDefault(require("../_util/useSet"));
41
-
42
24
  var _isFunction = _interopRequireDefault(require("../_util/isFunction"));
43
-
44
25
  var _axios = _interopRequireDefault(require("axios"));
45
-
46
26
  var _ahooks = require("ahooks");
47
-
48
27
  var _getSignature = _interopRequireDefault(require("@vtx/utils/lib/getSignature"));
49
-
50
28
  var _excluded = ["prefixCls", "toolbar", "toolbarClassName", "toolbarTilte", "buttonGroup", "refreshIconVisible", "hideColumnSetting", "hideColumnHeight", "visibleColumnKeys", "defaultVisibleColumnKeys", "onVisibleColumnsChange", "onRefresh", "indexColumn", "indexFixed", "bordered", "indexTitle", "startIndex", "autoFit", "headFootHeight", "columnResizable", "components", "className", "style", "emptyText", "onRowSelectionClear", "disabledColumnKeys", "onColumnsSave", "uniqueKey", "prefixUrl", "customEnumText", "hideSelectionClear", "indexWidth"];
51
-
52
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
53
-
54
- 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); }
55
-
56
- 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; }
57
-
58
- 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); }
59
-
60
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
61
-
29
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
30
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
31
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
32
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
33
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
62
34
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
63
-
64
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
65
-
66
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
67
-
68
- 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; }
69
-
70
- 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; }
71
-
72
- 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; }
73
-
74
- 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; }
75
-
76
- 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; }
77
-
78
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
79
-
35
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
36
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
37
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
38
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
39
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
40
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
41
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
42
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
43
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
44
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
80
45
  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."); }
81
-
82
- 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); }
83
-
84
- 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; }
85
-
86
- 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; }
87
-
88
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
89
-
46
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
47
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
48
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
49
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
90
50
  var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
91
-
92
51
  function VtxDatagrid(props) {
93
- var _rest$dataSource, _rest$rowSelection, _rest$rowSelection2, _dataSource2, _classnames, _rest$rowSelection3, _dataSource3;
94
-
52
+ var _rest$dataSource, _rest$rowSelection, _rest$rowSelection2, _dataSource2, _rest$rowSelection3, _dataSource3;
95
53
  var _useSet = (0, _useSet3["default"])({
96
- // 显示列
97
- visibleColumns: [],
98
- // 列设置选中的列
99
- checkedColumnKeys: [],
100
- // 列设置选项
101
- columnSettingOptions: [],
102
- datagridId: "vtx-datagrid-".concat(new Date().getTime()),
103
- scrollY: 0,
104
- size: 'middle',
105
- projectKey: '',
106
- // keys in rest.columns
107
- keysInColumns: []
108
- }),
109
- _useSet2 = _slicedToArray(_useSet, 2),
110
- state = _useSet2[0],
111
- setState = _useSet2[1];
112
-
54
+ // 显示列
55
+ visibleColumns: [],
56
+ // 列设置选中的列
57
+ checkedColumnKeys: [],
58
+ // 列设置选项
59
+ columnSettingOptions: [],
60
+ datagridId: "vtx-datagrid-".concat(new Date().getTime()),
61
+ scrollY: 0,
62
+ size: 'middle',
63
+ projectKey: '',
64
+ // keys in rest.columns
65
+ keysInColumns: []
66
+ }),
67
+ _useSet2 = _slicedToArray(_useSet, 2),
68
+ state = _useSet2[0],
69
+ setState = _useSet2[1];
113
70
  var visibleColumns = state.visibleColumns,
114
- checkedColumnKeys = state.checkedColumnKeys,
115
- columnSettingOptions = state.columnSettingOptions,
116
- datagridId = state.datagridId,
117
- scrollY = state.scrollY,
118
- size = state.size;
119
- var datagridRef = (0, _react.useRef)(null); // 列设置提示高度
120
-
121
- var alertHeight = (0, _react.useRef)(0); // 工具栏高度
122
-
123
- var toolbarHeight = (0, _react.useRef)(0); // 列接口显示字段
124
-
71
+ checkedColumnKeys = state.checkedColumnKeys,
72
+ columnSettingOptions = state.columnSettingOptions,
73
+ datagridId = state.datagridId,
74
+ scrollY = state.scrollY,
75
+ size = state.size;
76
+ var datagridRef = (0, _react.useRef)(null);
77
+ // 列设置提示高度
78
+ var alertHeight = (0, _react.useRef)(0);
79
+ // 工具栏高度
80
+ var toolbarHeight = (0, _react.useRef)(0);
81
+ // 列接口显示字段
125
82
  var settingRef = (0, _react.useRef)();
126
-
127
83
  var _props$prefixCls = props.prefixCls,
128
- prefixCls = _props$prefixCls === void 0 ? 'vtx-datagrid' : _props$prefixCls,
129
- _props$toolbar = props.toolbar,
130
- toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
131
- toolbarClassName = props.toolbarClassName,
132
- _props$toolbarTilte = props.toolbarTilte,
133
- toolbarTilte = _props$toolbarTilte === void 0 ? '查询结果' : _props$toolbarTilte,
134
- buttonGroup = props.buttonGroup,
135
- _props$refreshIconVis = props.refreshIconVisible,
136
- refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
137
- hideColumnSetting = props.hideColumnSetting,
138
- hideColumnHeight = props.hideColumnHeight,
139
- visibleColumnKeys = props.visibleColumnKeys,
140
- defaultVisibleColumnKeys = props.defaultVisibleColumnKeys,
141
- onVisibleColumnsChange = props.onVisibleColumnsChange,
142
- onRefresh = props.onRefresh,
143
- _props$indexColumn = props.indexColumn,
144
- indexColumn = _props$indexColumn === void 0 ? true : _props$indexColumn,
145
- _props$indexFixed = props.indexFixed,
146
- indexFixed = _props$indexFixed === void 0 ? false : _props$indexFixed,
147
- _props$bordered = props.bordered,
148
- bordered = _props$bordered === void 0 ? true : _props$bordered,
149
- _props$indexTitle = props.indexTitle,
150
- indexTitle = _props$indexTitle === void 0 ? '序号' : _props$indexTitle,
151
- _props$startIndex = props.startIndex,
152
- startIndex = _props$startIndex === void 0 ? 1 : _props$startIndex,
153
- _props$autoFit = props.autoFit,
154
- autoFit = _props$autoFit === void 0 ? true : _props$autoFit,
155
- _props$headFootHeight = props.headFootHeight,
156
- headFootHeight = _props$headFootHeight === void 0 ? 115 : _props$headFootHeight,
157
- columnResizable = props.columnResizable,
158
- components = props.components,
159
- className = props.className,
160
- style = props.style,
161
- _props$emptyText = props.emptyText,
162
- emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
163
- onRowSelectionClear = props.onRowSelectionClear,
164
- disabledColumnKeys = props.disabledColumnKeys,
165
- onColumnsSave = props.onColumnsSave,
166
- uniqueKey = props.uniqueKey,
167
- prefixUrl = props.prefixUrl,
168
- _props$customEnumText = props.customEnumText,
169
- customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
170
- _props$hideSelectionC = props.hideSelectionClear,
171
- hideSelectionClear = _props$hideSelectionC === void 0 ? false : _props$hideSelectionC,
172
- _props$indexWidth = props.indexWidth,
173
- indexWidth = _props$indexWidth === void 0 ? 70 : _props$indexWidth,
174
- rest = _objectWithoutProperties(props, _excluded);
175
-
84
+ prefixCls = _props$prefixCls === void 0 ? 'vtx-datagrid' : _props$prefixCls,
85
+ _props$toolbar = props.toolbar,
86
+ toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
87
+ toolbarClassName = props.toolbarClassName,
88
+ _props$toolbarTilte = props.toolbarTilte,
89
+ toolbarTilte = _props$toolbarTilte === void 0 ? '查询结果' : _props$toolbarTilte,
90
+ buttonGroup = props.buttonGroup,
91
+ _props$refreshIconVis = props.refreshIconVisible,
92
+ refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
93
+ hideColumnSetting = props.hideColumnSetting,
94
+ hideColumnHeight = props.hideColumnHeight,
95
+ visibleColumnKeys = props.visibleColumnKeys,
96
+ defaultVisibleColumnKeys = props.defaultVisibleColumnKeys,
97
+ onVisibleColumnsChange = props.onVisibleColumnsChange,
98
+ onRefresh = props.onRefresh,
99
+ _props$indexColumn = props.indexColumn,
100
+ indexColumn = _props$indexColumn === void 0 ? true : _props$indexColumn,
101
+ _props$indexFixed = props.indexFixed,
102
+ indexFixed = _props$indexFixed === void 0 ? false : _props$indexFixed,
103
+ _props$bordered = props.bordered,
104
+ bordered = _props$bordered === void 0 ? true : _props$bordered,
105
+ _props$indexTitle = props.indexTitle,
106
+ indexTitle = _props$indexTitle === void 0 ? '序号' : _props$indexTitle,
107
+ _props$startIndex = props.startIndex,
108
+ startIndex = _props$startIndex === void 0 ? 1 : _props$startIndex,
109
+ _props$autoFit = props.autoFit,
110
+ autoFit = _props$autoFit === void 0 ? true : _props$autoFit,
111
+ _props$headFootHeight = props.headFootHeight,
112
+ headFootHeight = _props$headFootHeight === void 0 ? 115 : _props$headFootHeight,
113
+ columnResizable = props.columnResizable,
114
+ components = props.components,
115
+ className = props.className,
116
+ style = props.style,
117
+ _props$emptyText = props.emptyText,
118
+ emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
119
+ onRowSelectionClear = props.onRowSelectionClear,
120
+ disabledColumnKeys = props.disabledColumnKeys,
121
+ onColumnsSave = props.onColumnsSave,
122
+ uniqueKey = props.uniqueKey,
123
+ prefixUrl = props.prefixUrl,
124
+ _props$customEnumText = props.customEnumText,
125
+ customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
126
+ _props$hideSelectionC = props.hideSelectionClear,
127
+ hideSelectionClear = _props$hideSelectionC === void 0 ? false : _props$hideSelectionC,
128
+ _props$indexWidth = props.indexWidth,
129
+ indexWidth = _props$indexWidth === void 0 ? 70 : _props$indexWidth,
130
+ rest = _objectWithoutProperties(props, _excluded);
176
131
  var TextEnum = _objectSpread({
177
132
  refreshText: '刷新',
178
133
  densityDefaultText: '默认',
@@ -191,12 +146,11 @@ function VtxDatagrid(props) {
191
146
  messageWarningOneText: '至少勾选一列保存',
192
147
  paginationTotalText: '共',
193
148
  paginationItemText: '条'
194
- }, customEnumText); // 规则,菜单根目录_页面路由
195
-
149
+ }, customEnumText);
196
150
 
151
+ // 规则,菜单根目录_页面路由
197
152
  function getUniqueKey() {
198
153
  var route = location.href.match(/#\/(\S*)\?/);
199
-
200
154
  if (route) {
201
155
  (0, _axios["default"])({
202
156
  method: 'GET',
@@ -204,7 +158,6 @@ function VtxDatagrid(props) {
204
158
  headers: _objectSpread({}, (0, _getSignature["default"])({}))
205
159
  }).then(function (res) {
206
160
  var _res$data;
207
-
208
161
  if ((res === null || res === void 0 ? void 0 : res.status) == 200 && (_res$data = res.data) !== null && _res$data !== void 0 && _res$data.key) {
209
162
  setState({
210
163
  projectKey: "".concat(res.data.key, "_").concat(route ? route[1] : 'test')
@@ -212,46 +165,41 @@ function VtxDatagrid(props) {
212
165
  }
213
166
  });
214
167
  }
215
- } // 高度计算
216
-
168
+ }
217
169
 
170
+ // 高度计算
218
171
  var _useThrottleFn = (0, _ahooks.useThrottleFn)(function () {
219
- var _datagridRef$current;
220
-
221
- if (!datagridRef.current) {
222
- return null;
223
- }
224
-
225
- var bodyHeight = ((_datagridRef$current = datagridRef.current) === null || _datagridRef$current === void 0 ? void 0 : _datagridRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
226
- var divs = datagridRef.current.getElementsByTagName('div');
227
- var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
228
- return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content');
229
- })[0];
230
- bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
231
- setState({
232
- scrollY: bodyHeight
233
- });
234
- }, {
235
- wait: 350
236
- }),
237
- calculateHeight = _useThrottleFn.run;
238
-
172
+ var _datagridRef$current;
173
+ if (!datagridRef.current) {
174
+ return null;
175
+ }
176
+ var bodyHeight = ((_datagridRef$current = datagridRef.current) === null || _datagridRef$current === void 0 ? void 0 : _datagridRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
177
+ var divs = datagridRef.current.getElementsByTagName('div');
178
+ var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
179
+ return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content');
180
+ })[0];
181
+ bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
182
+ setState({
183
+ scrollY: bodyHeight
184
+ });
185
+ }, {
186
+ wait: 350
187
+ }),
188
+ calculateHeight = _useThrottleFn.run;
239
189
  (0, _react.useEffect)(function () {
240
190
  // 当没有传入唯一值而且没有自定义列保存的时候且根据规则自动生成唯一值
241
191
  if (!uniqueKey && !onColumnsSave && toolbar && !hideColumnSetting) {
242
192
  getUniqueKey();
243
193
  }
244
-
245
194
  var resizeObserver = new ResizeObserver(function () {
246
195
  calculateHeight();
247
- }); // componentDidMount
248
-
196
+ });
197
+ // componentDidMount
249
198
  if (autoFit && datagridRef.current) {
250
199
  resizeObserver.observe(datagridRef.current, {
251
200
  box: 'border-box'
252
201
  });
253
202
  }
254
-
255
203
  return function () {
256
204
  // componentWillUnmount
257
205
  if (autoFit) {
@@ -266,7 +214,6 @@ function VtxDatagrid(props) {
266
214
  }, [(_rest$dataSource = rest.dataSource) === null || _rest$dataSource === void 0 ? void 0 : _rest$dataSource.length, (((_rest$rowSelection = rest.rowSelection) === null || _rest$rowSelection === void 0 ? void 0 : _rest$rowSelection.selectedRowKeys) || []).join(',')]);
267
215
  (0, _react.useEffect)(function () {
268
216
  var _rest$columns;
269
-
270
217
  parseColumns();
271
218
  var keys = [];
272
219
  var options = (_rest$columns = rest.columns) === null || _rest$columns === void 0 ? void 0 : _rest$columns.map(function (col) {
@@ -282,21 +229,17 @@ function VtxDatagrid(props) {
282
229
  }, [rest.columns]);
283
230
  (0, _react.useEffect)(function () {
284
231
  var _settingRef$current;
285
-
286
- (_settingRef$current = settingRef.current) === null || _settingRef$current === void 0 ? void 0 : _settingRef$current.updateShowColumns(visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.join(","));
232
+ (_settingRef$current = settingRef.current) === null || _settingRef$current === void 0 || _settingRef$current.updateShowColumns(visibleColumnKeys === null || visibleColumnKeys === void 0 ? void 0 : visibleColumnKeys.join(","));
287
233
  }, [visibleColumnKeys]);
288
234
  (0, _react.useEffect)(function () {
289
235
  handleChangeColumns(state.keysInColumns);
290
236
  }, [JSON.stringify(state.keysInColumns)]);
291
-
292
237
  var parseColumns = function parseColumns(type) {
293
238
  // 显示工具栏的同时并显示列设置
294
239
  if (toolbar && !hideColumnSetting) {
295
240
  var _settingRef$current2;
296
-
297
241
  if (defaultVisibleColumnKeys || visibleColumnKeys || (_settingRef$current2 = settingRef.current) !== null && _settingRef$current2 !== void 0 && _settingRef$current2.showColumns) {
298
242
  var _settingRef$current3, _rest$columns2;
299
-
300
243
  var columnKeys = type === 'reset' ? defaultVisibleColumnKeys : ((_settingRef$current3 = settingRef.current) === null || _settingRef$current3 === void 0 ? void 0 : _settingRef$current3.showColumns) || visibleColumnKeys || defaultVisibleColumnKeys;
301
244
  setState({
302
245
  checkedColumnKeys: columnKeys,
@@ -306,7 +249,6 @@ function VtxDatagrid(props) {
306
249
  });
307
250
  } else {
308
251
  var _rest$columns3;
309
-
310
252
  setState({
311
253
  checkedColumnKeys: (_rest$columns3 = rest.columns) === null || _rest$columns3 === void 0 ? void 0 : _rest$columns3.map(function (item) {
312
254
  return item.dataIndex || item.key;
@@ -320,14 +262,13 @@ function VtxDatagrid(props) {
320
262
  });
321
263
  }
322
264
  };
323
-
324
265
  var hasAlert = (((_rest$rowSelection2 = rest.rowSelection) === null || _rest$rowSelection2 === void 0 ? void 0 : _rest$rowSelection2.selectedRowKeys) || []).length > 0;
325
266
  alertHeight.current = !hideSelectionClear && hasAlert ? 49 : 0;
326
- toolbarHeight.current = toolbar ? 56 : 0; // 列设置回调
267
+ toolbarHeight.current = toolbar ? 56 : 0;
327
268
 
269
+ // 列设置回调
328
270
  var handleChangeColumns = function handleChangeColumns(keys) {
329
271
  var _rest$columns4;
330
-
331
272
  var columnKeys = keys || ((_rest$columns4 = rest.columns) === null || _rest$columns4 === void 0 ? void 0 : _rest$columns4.map(function (item) {
332
273
  return item.dataIndex || item.key;
333
274
  }));
@@ -338,11 +279,10 @@ function VtxDatagrid(props) {
338
279
  })
339
280
  });
340
281
  onVisibleColumnsChange && onVisibleColumnsChange(columnKeys);
341
- }; // 工具栏
342
-
282
+ };
343
283
 
284
+ // 工具栏
344
285
  var toolbarRender;
345
-
346
286
  if (toolbar) {
347
287
  toolbarRender = /*#__PURE__*/_react["default"].createElement("div", {
348
288
  className: (0, _classnames2["default"])("".concat(prefixCls, "-toolbar"), toolbarClassName)
@@ -404,14 +344,13 @@ function VtxDatagrid(props) {
404
344
  }, /*#__PURE__*/_react["default"].createElement(_tooltip["default"], {
405
345
  title: TextEnum.columnSettingText
406
346
  }, /*#__PURE__*/_react["default"].createElement(_SettingOutlined["default"], null)))))));
407
- } // 分页
408
-
347
+ }
409
348
 
349
+ // 分页
410
350
  var getPagination = function getPagination(pagination) {
411
351
  if (typeof pagination === 'boolean' && !pagination) {
412
352
  return pagination;
413
353
  }
414
-
415
354
  return _objectSpread({
416
355
  pageSizeOptions: ['10', '20', '30', '40', '50'],
417
356
  showSizeChanger: true,
@@ -420,20 +359,17 @@ function VtxDatagrid(props) {
420
359
  return "".concat(TextEnum.paginationTotalText, " ").concat(total, " ").concat(TextEnum.paginationItemText);
421
360
  }
422
361
  }, pagination);
423
- }; // 处理操作按钮
424
-
362
+ };
425
363
 
364
+ // 处理操作按钮
426
365
  var columns = (visibleColumns || []).map(function (column) {
427
366
  var newColumn = _objectSpread({}, column);
428
-
429
367
  if (newColumn.renderButtons) {
430
368
  delete newColumn.renderButtons;
431
369
  }
432
-
433
370
  if (newColumn.renderButtonsVisibleNum) {
434
371
  delete newColumn.renderButtonsVisibleNum;
435
372
  }
436
-
437
373
  return _objectSpread(_objectSpread({}, newColumn), {}, {
438
374
  render: (0, _isFunction["default"])(column.renderButtons) ? function (text, record, index) {
439
375
  return (0, _renderColumnButtons["default"])(column.renderButtons, column.renderButtonsVisibleNum, text, record, index, TextEnum);
@@ -441,8 +377,8 @@ function VtxDatagrid(props) {
441
377
  return ['', null, undefined].includes(text) ? '-' : text;
442
378
  }
443
379
  });
444
- }); // 配置了列可伸缩
445
-
380
+ });
381
+ // 配置了列可伸缩
446
382
  if (columnResizable) {
447
383
  columns = columns.map(function (col, index) {
448
384
  return _objectSpread(_objectSpread({}, col), {}, {
@@ -454,15 +390,12 @@ function VtxDatagrid(props) {
454
390
  }
455
391
  });
456
392
  });
457
-
458
393
  var handleResize = function handleResize(index) {
459
394
  return function (e, _ref2) {
460
395
  var size = _ref2.size;
461
396
  setState(function (_ref3) {
462
397
  var visibleColumns = _ref3.visibleColumns;
463
-
464
398
  var nextColumns = _toConsumableArray(visibleColumns);
465
-
466
399
  nextColumns[index] = _objectSpread(_objectSpread({}, nextColumns[index]), {}, {
467
400
  width: size.width
468
401
  });
@@ -472,14 +405,12 @@ function VtxDatagrid(props) {
472
405
  });
473
406
  };
474
407
  };
475
- } // 序号添加
476
-
408
+ }
477
409
 
410
+ // 序号添加
478
411
  var dataSource = rest.dataSource;
479
-
480
412
  if (indexColumn) {
481
413
  var _dataSource;
482
-
483
414
  columns = [{
484
415
  title: indexTitle,
485
416
  dataIndex: '_serialNum',
@@ -493,18 +424,15 @@ function VtxDatagrid(props) {
493
424
  });
494
425
  });
495
426
  }
496
-
497
427
  var scroll = rest.scroll || {};
498
-
499
428
  if (autoFit) {
500
429
  scroll = _objectSpread(_objectSpread({}, scroll), {}, {
501
430
  y: scrollY - (rest.scrollY || 0)
502
431
  });
503
432
  }
504
-
505
433
  return /*#__PURE__*/_react["default"].createElement("div", {
506
434
  id: datagridId,
507
- className: (0, _classnames2["default"])(prefixCls, className, (_classnames = {}, _defineProperty(_classnames, "".concat(prefixCls, "-fit"), autoFit), _defineProperty(_classnames, "".concat(prefixCls, "-noFit"), !autoFit), _defineProperty(_classnames, "".concat(prefixCls, "-nodata"), !((_dataSource2 = dataSource) !== null && _dataSource2 !== void 0 && _dataSource2.length)), _defineProperty(_classnames, "".concat(prefixCls, "-userAgent-mac"), isMac), _classnames)),
435
+ className: (0, _classnames2["default"])(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !((_dataSource2 = dataSource) !== null && _dataSource2 !== void 0 && _dataSource2.length)), "".concat(prefixCls, "-userAgent-mac"), isMac)),
508
436
  style: style,
509
437
  ref: datagridRef
510
438
  }, toolbarRender, !hideSelectionClear && hasAlert ? /*#__PURE__*/_react["default"].createElement("div", {
@@ -537,7 +465,6 @@ function VtxDatagrid(props) {
537
465
  }) : components
538
466
  })));
539
467
  }
540
-
541
468
  VtxDatagrid.propTypes = {
542
469
  prefixCls: _propTypes["default"].string,
543
470
  refreshIconVisible: _propTypes["default"].bool,