@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.6

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 (188) hide show
  1. package/AutoBox/index.js +72 -85
  2. package/AutoTips/index.js +72 -95
  3. package/Badge/index.js +17 -16
  4. package/Breadcrumbs/index.js +57 -73
  5. package/Button/index.js +90 -118
  6. package/ButtonGroup/index.js +30 -33
  7. package/Carousel/index.js +29 -33
  8. package/Cascader/index.js +9 -10
  9. package/Checkbox/index.js +28 -35
  10. package/CheckboxGroup/index.js +43 -58
  11. package/Collapse/index.js +52 -49
  12. package/CollapseBox/index.js +65 -70
  13. package/CollapseLayout/index.js +106 -101
  14. package/ColorPicker/index.js +3 -3
  15. package/ComboSelect/index.js +260 -337
  16. package/ComboSelect/lang/en_US.d.ts +1 -0
  17. package/ComboSelect/lang/index.d.ts +2 -0
  18. package/ComboSelect/lang/zh_CN.d.ts +1 -0
  19. package/ComboSelect/utils.d.ts +6 -0
  20. package/Container/index.js +17 -21
  21. package/CopyText/index.js +50 -83
  22. package/DatePicker/index.js +24 -27
  23. package/Descriptions/index.js +50 -59
  24. package/Desktop/index.js +161 -180
  25. package/DragVerify/index.js +77 -113
  26. package/Drawer/index.js +80 -95
  27. package/Dropdown/index.js +3 -3
  28. package/DynamicMultiBox/index.js +222 -224
  29. package/DynamicMultiBox/interface.d.ts +7 -0
  30. package/Empty/index.js +26 -28
  31. package/Form/index.js +70 -74
  32. package/FormItem/index.js +18 -15
  33. package/FunctionModal/index.js +7 -14
  34. package/GlobalContext/index.js +17 -20
  35. package/Help/index.js +9 -12
  36. package/HelperText/index.js +11 -11
  37. package/InputLang/index.js +104 -124
  38. package/InputNumber/index.js +62 -81
  39. package/Label/index.js +19 -21
  40. package/Loading/index.js +11 -10
  41. package/Menu/index.js +302 -371
  42. package/Message/index.js +104 -113
  43. package/Modal/index.js +122 -148
  44. package/MultiBox/index.d.ts +5 -0
  45. package/MultiBox/index.js +111 -115
  46. package/Notification/index.js +105 -103
  47. package/OperateBtn/index.d.ts +3 -0
  48. package/OperateBtn/index.js +77 -107
  49. package/PageHeader/index.js +327 -406
  50. package/Pagination/index.js +107 -137
  51. package/ParauiProvider/index.js +20 -22
  52. package/PasswordRules/index.js +36 -40
  53. package/PopConfirm/index.js +60 -77
  54. package/Popover/index.js +12 -12
  55. package/Progress/index.js +72 -74
  56. package/Querying/index.js +22 -23
  57. package/README.md +2 -0
  58. package/Radio/index.js +27 -34
  59. package/RadioGroup/index.js +38 -52
  60. package/Search/index.js +34 -43
  61. package/Select/index.js +281 -345
  62. package/SelectInput/index.js +8 -13
  63. package/Selector/index.js +582 -796
  64. package/SelectorPicker/index.js +113 -134
  65. package/SingleBox/index.d.ts +5 -0
  66. package/SingleBox/index.js +92 -88
  67. package/Slider/index.js +46 -57
  68. package/Status/index.js +14 -13
  69. package/Stepper/index.js +24 -25
  70. package/Styles/theme.scss +9 -9
  71. package/Switch/index.js +32 -35
  72. package/Table/index.js +360 -494
  73. package/Tabs/index.js +100 -100
  74. package/Tag/index.js +64 -82
  75. package/TextEditor/index.js +78 -100
  76. package/TextField/index.js +142 -183
  77. package/TimePicker/index.js +29 -28
  78. package/Timeline/index.js +50 -47
  79. package/Title/index.js +32 -34
  80. package/ToggleButton/index.js +29 -29
  81. package/Tooltip/index.js +52 -56
  82. package/Transfer/index.js +117 -154
  83. package/Tree/index.js +9 -10
  84. package/Upload/index.js +125 -143
  85. package/Upload/interface.d.ts +2 -0
  86. package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
  87. package/_verture/{index-5a7e2438.js → index-3cdaba96.js} +967 -934
  88. package/_verture/{index-b1f80962.js → index-4fafd0a0.js} +6 -8
  89. package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
  90. package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
  91. package/_verture/{index-232d890b.js → index-d63bd287.js} +1 -1
  92. package/_verture/index-da9097d3.js +239 -0
  93. package/_verture/{index-9331b116.js → index-e0f9064d.js} +125 -134
  94. package/_verture/intl-f2f27722.js +69 -0
  95. package/_verture/{modalContext-736ff215.js → modalContext-8534f23d.js} +36 -64
  96. package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
  97. package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
  98. package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
  99. package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
  100. package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
  101. package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
  102. package/_verture/utils-c17b5265.js +97 -0
  103. package/index.js +24 -23
  104. package/locale/en-US.d.ts +1 -0
  105. package/locale/index.d.ts +2 -0
  106. package/locale/index.js +10 -8
  107. package/locale/zh-CN.d.ts +1 -0
  108. package/package.json +11 -10
  109. package/umd/AutoBox.js +9 -8
  110. package/umd/AutoTips.js +9 -8
  111. package/umd/Badge.js +1 -1
  112. package/umd/Breadcrumbs.js +9 -8
  113. package/umd/Button.js +9 -8
  114. package/umd/ButtonGroup.js +9 -8
  115. package/umd/Carousel.js +5 -5
  116. package/umd/Cascader.js +9 -8
  117. package/umd/Checkbox.js +9 -8
  118. package/umd/CheckboxGroup.js +9 -8
  119. package/umd/Collapse.js +8 -7
  120. package/umd/CollapseBox.js +1 -1
  121. package/umd/CollapseLayout.js +4 -4
  122. package/umd/ColorPicker.js +1 -1
  123. package/umd/ComboSelect.js +9 -8
  124. package/umd/Container.js +1 -1
  125. package/umd/CopyText.js +9 -8
  126. package/umd/DatePicker.js +9 -8
  127. package/umd/Descriptions.js +9 -8
  128. package/umd/Desktop.js +9 -8
  129. package/umd/DragVerify.js +4 -4
  130. package/umd/Drawer.js +9 -8
  131. package/umd/Dropdown.js +6 -5
  132. package/umd/DynamicMultiBox.js +11 -10
  133. package/umd/Empty.js +1 -1
  134. package/umd/Form.js +9 -8
  135. package/umd/FormItem.js +9 -8
  136. package/umd/FunctionModal.js +9 -8
  137. package/umd/GlobalContext.js +1 -1
  138. package/umd/Help.js +9 -8
  139. package/umd/HelperText.js +1 -1
  140. package/umd/InputLang.js +9 -8
  141. package/umd/InputNumber.js +9 -8
  142. package/umd/Label.js +9 -8
  143. package/umd/Loading.js +4 -4
  144. package/umd/Menu.js +4 -4
  145. package/umd/Message.js +4 -4
  146. package/umd/Modal.js +9 -8
  147. package/umd/MultiBox.js +9 -8
  148. package/umd/Notification.js +8 -7
  149. package/umd/OperateBtn.js +9 -8
  150. package/umd/PageHeader.js +9 -8
  151. package/umd/Pagination.js +9 -8
  152. package/umd/ParauiProvider.js +1 -1
  153. package/umd/PasswordRules.js +4 -4
  154. package/umd/PopConfirm.js +9 -8
  155. package/umd/Popover.js +9 -8
  156. package/umd/Progress.js +5 -5
  157. package/umd/Querying.js +1 -1
  158. package/umd/Radio.js +9 -8
  159. package/umd/RadioGroup.js +9 -8
  160. package/umd/Search.js +9 -8
  161. package/umd/Select.js +9 -8
  162. package/umd/SelectInput.js +9 -8
  163. package/umd/Selector.js +9 -8
  164. package/umd/SelectorPicker.js +9 -8
  165. package/umd/SingleBox.js +9 -8
  166. package/umd/Slider.js +6 -5
  167. package/umd/Status.js +4 -4
  168. package/umd/Stepper.js +9 -8
  169. package/umd/Switch.js +9 -8
  170. package/umd/Table.js +9 -8
  171. package/umd/Tabs.js +9 -8
  172. package/umd/Tag.js +9 -8
  173. package/umd/TextEditor.js +22 -21
  174. package/umd/TextField.js +9 -8
  175. package/umd/TimePicker.js +9 -8
  176. package/umd/Timeline.js +1 -1
  177. package/umd/Title.js +9 -8
  178. package/umd/ToggleButton.js +9 -8
  179. package/umd/Tooltip.js +9 -8
  180. package/umd/Transfer.js +10 -9
  181. package/umd/Tree.js +9 -8
  182. package/umd/Upload.js +10 -9
  183. package/umd/locale.js +1 -1
  184. package/_verture/index-e9007d6a.js +0 -236
  185. package/_verture/intl-5c1ec055.js +0 -81
  186. package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
  187. package/_verture/utils-418da0a4.js +0 -73
  188. /package/_verture/{typeof-c310ee4a.js → typeof-b240b062.js} +0 -0
package/Table/index.js CHANGED
@@ -1,13 +1,11 @@
1
- import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
2
- import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
3
- import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
4
- import { r as regenerator } from '../_verture/index-232d890b.js';
5
1
  import { _ as __rest, a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
6
2
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
3
  import { useRef, useState, useEffect, useMemo, useCallback, Fragment as Fragment$1 } from 'react';
8
4
  import { Get, Post, DeepClone, GetBrowserClass, Cancel, ArrayToObject } from '@paraview/lib';
5
+ import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
6
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-75fa4188.js';
9
7
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
- import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
8
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
11
9
  import { Popover } from '../Popover/index.js';
12
10
  import { Checkbox } from '../Checkbox/index.js';
13
11
  import { Button } from '../Button/index.js';
@@ -16,7 +14,7 @@ import Screen from '@para-ui/icons/ScreenF';
16
14
  import SolidArrowUp from '@para-ui/icons/UpTriangleF';
17
15
  import SolidArrowDown from '@para-ui/icons/DownTriangleF';
18
16
  import Panel from '@para-ui/icons/Panel';
19
- import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
17
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
20
18
  import Empty from '../Empty/index.js';
21
19
  import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
22
20
  import { Radio } from '../Radio/index.js';
@@ -25,28 +23,30 @@ import Down from '@para-ui/icons/Down';
25
23
  import Refresh from '@para-ui/icons/Refresh';
26
24
  import { Pagination } from '../Pagination/index.js';
27
25
  import { Loading } from '../Loading/index.js';
28
- import { u as useGlobalProps } from '../_verture/useGlobalProps-1b846a65.js';
29
- import '../_verture/unsupportedIterableToArray-cb478f24.js';
30
- import '../_verture/typeof-c310ee4a.js';
26
+ import { u as useGlobalProps } from '../_verture/useGlobalProps-1e416658.js';
31
27
  import '../Tooltip/index.js';
32
28
  import 'rc-tooltip';
33
29
  import 'rc-tooltip/lib/placements';
34
30
  import 'clsx';
35
31
  import '@para-ui/icons/Forbid';
36
- import '../_verture/usePopupContainer-87febeb9.js';
32
+ import '../_verture/usePopupContainer-635f66f4.js';
37
33
  import '../Label/index.js';
38
34
  import '../Help/index.js';
39
35
  import '@para-ui/icons/Help';
40
36
  import '@para-ui/icons/LoadingF';
41
- import '../_verture/index-e9007d6a.js';
37
+ import '../_verture/index-da9097d3.js';
42
38
  import 'rc-dropdown';
43
39
  import 'dayjs';
44
40
  import '@para-ui/core/GlobalContext';
45
41
  import '@para-ui/icons/More';
42
+ import '../PopConfirm/index.js';
43
+ import '@para-ui/icons/CheckCircleF';
44
+ import '@para-ui/icons/WarningCircle';
45
+ import '@para-ui/icons/CloseCircleF';
46
+ import '@para-ui/icons/WarningCircleF';
46
47
  import '../TextField/index.js';
47
48
  import '@para-ui/icons/PreviewClose';
48
49
  import '@para-ui/icons/PreviewOpen';
49
- import '@para-ui/icons/CloseCircleF';
50
50
  import '../HelperText/index.js';
51
51
  import '../Select/index.js';
52
52
  import '@para-ui/icons/Close';
@@ -1771,212 +1771,115 @@ var TableElement = function TableElement(props) {
1771
1771
  }));
1772
1772
  };
1773
1773
 
1774
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-table {\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n position: relative;\n}\n.paraui-v4-table.paraui-v4-table-draggable * {\n user-select: none !important;\n}\n.paraui-v4-table.paraui-v4-table-fixed-table > .table-contain > table {\n table-layout: fixed;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-checkbox {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-radio {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-expandable {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-radio.paraui-v4-table-check .table-radio {\n left: 48px;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-expandable.paraui-v4-table-check .table-expandable {\n left: 48px;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-expandable.paraui-v4-table-check.paraui-v4-table-radio .table-expandable {\n left: 80px;\n}\n.paraui-v4-table.paraui-v4-table-no-data > .table-container > table {\n height: 100%;\n}\n.paraui-v4-table.paraui-v4-table-no-data > .table-container > table .paraui-v4-empty {\n overflow: hidden;\n}\n.paraui-v4-table.paraui-v4-table-load.paraui-v4-table-no-data > .table-container > table {\n height: auto;\n}\n.paraui-v4-table.paraui-v4-table-pagination > .table-contain {\n height: calc(100% - 60px);\n}\n.paraui-v4-table.paraui-v4-table-pagination.table-load-more > .table-contain {\n height: 100%;\n}\n.paraui-v4-table.paraui-v4-table-load-more.paraui-v4-table-pagination > .table-contain {\n height: 100%;\n}\n.paraui-v4-table > .table-contain {\n height: 100%;\n position: relative;\n}\n.paraui-v4-table > .table-contain > table {\n height: auto;\n}\n.paraui-v4-table > .table-contain > table .table-checkbox > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-checkbox .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-radio > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-radio .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-expandable > svg {\n vertical-align: middle;\n}\n.paraui-v4-table > .table-contain > table > .table-head {\n width: 100%;\n white-space: nowrap;\n}\n.paraui-v4-table > .table-contain > table > .table-head > tr th {\n height: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-head.table-head-scroll tr th {\n max-width: 240px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-serial-number .table-header-box .table-header-title {\n padding-right: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box {\n height: 47px;\n line-height: 47px;\n position: relative;\n padding: 0 8px;\n display: flex;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-title {\n max-width: 100%;\n display: flex;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-header-title-label {\n width: 100%;\n color: rgb(92, 101, 115);\n font-weight: 700;\n font-size: 14px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span {\n width: 20px;\n height: 20px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border-radius: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover {\n background-color: rgba(46, 101, 230, 0.1);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > svg {\n font-size: 12px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .up-svg {\n position: relative;\n top: 3px;\n transform: scale(0.8);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .down-svg {\n position: relative;\n top: -3px;\n transform: scale(0.8);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n border-radius: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover {\n background-color: rgba(46, 101, 230, 0.1);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span > svg {\n font-size: 14px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show > span > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > span > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > span:after {\n position: absolute;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background-color: rgb(244, 66, 66);\n content: \"\";\n right: 3px;\n top: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort > .table-header-title {\n padding-right: 8px;\n max-width: calc(100% - 20px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-filter > .table-header-title {\n padding-right: 8px;\n max-width: calc(100% - 20px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort.table-header-box-filter > .table-header-title {\n max-width: calc(100% - 40px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-asc > .table-sort-svg > span > .up-svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-desc > .table-sort-svg > span > .down-svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums {\n width: 53px;\n cursor: pointer;\n border-left: 1px solid rgb(234, 236, 241);\n right: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box > svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head.table-head-no-btn tr th:first-child .table-header-box {\n padding-left: 20px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn > .table-header-box {\n width: 32px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn:first-child {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn:first-child > .table-header-box {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-body {\n width: 100%;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-scroll tr td {\n max-width: 240px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td {\n background-color: white;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate {\n padding-right: 16px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr:nth-of-type(2n) td {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr:hover td {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > svg {\n transition: all 0.3s;\n cursor: pointer;\n font-size: 18px;\n color: rgb(92, 101, 115);\n transform: rotate(270deg);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > svg:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > .expand {\n transform: rotate(360deg);\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row {\n cursor: pointer;\n position: sticky;\n bottom: 0;\n z-index: 10;\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row .more-btn {\n color: rgb(46, 101, 230);\n font-size: 14px;\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row > .td-element {\n position: relative;\n background: white;\n box-shadow: 4px -4px 8px 0px rgb(234, 236, 241);\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn tr td:first-child {\n padding-left: 20px;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn tr.more-table-row td:first-child {\n padding-left: 8px;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn > .table-no-data > td:first-child {\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-body .table-body-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-body .table-body-btn:first-child {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data {\n height: calc(100% - 50px);\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data:hover td {\n background-color: white;\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data > td {\n padding: 56px 0 0 0;\n}\n.paraui-v4-table > .table-contain > .table-pos-line {\n position: absolute;\n top: 0;\n width: 1px;\n background-color: rgb(46, 101, 230);\n z-index: 1000;\n}\n.paraui-v4-table > .table-pagination {\n width: 100%;\n height: 60px;\n display: flex;\n align-items: flex-end;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right {\n display: flex;\n height: 32px;\n align-items: center;\n color: rgb(29, 33, 38);\n line-height: 32px;\n padding-left: 16px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .all-select {\n margin-left: 12px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 10px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .check-number {\n width: 65px;\n display: inline-block;\n}\n.paraui-v4-table > .table-pagination .table-pagination-com {\n flex: 1;\n justify-content: flex-end;\n}\n.paraui-v4-table > .table-pagination .refresh-btn {\n margin-left: 20px;\n}\n\n.paraui-v4-table-show-colums-popover > .component-popover-content {\n min-width: 200px;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box {\n padding-top: 4px;\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item {\n height: 30px;\n line-height: 30px;\n cursor: pointer;\n display: flex;\n padding: 0 10px;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > span {\n padding-left: 8px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 14px);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover {\n background: rgb(247, 248, 250);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled {\n cursor: inherit;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled > span {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled:hover {\n background: transparent;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer {\n height: 36px;\n border-top: 1px solid rgb(247, 248, 250);\n text-align: center;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button {\n width: 100%;\n height: 100%;\n margin: 0;\n}\n\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box {\n padding-top: 4px;\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item {\n height: 30px;\n line-height: 30px;\n cursor: pointer;\n display: flex;\n padding: 0 10px;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > span {\n padding-left: 8px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 14px);\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item:hover {\n background: rgb(247, 248, 250);\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-footer {\n height: 36px;\n border-top: 1px solid rgb(247, 248, 250);\n text-align: center;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button {\n width: 50%;\n height: 100%;\n margin: 0;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select.filter-select-none {\n text-align: center;\n padding: 20px 0;\n}\n.paraui-v4-filter-popover.paraui-v4-filter-popover-default > .component-popover-content {\n min-width: 200px;\n}";
1774
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-table {\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n position: relative;\n}\n.paraui-v4-table.paraui-v4-table-draggable * {\n user-select: none !important;\n}\n.paraui-v4-table.paraui-v4-table-fixed-table > .table-contain > table {\n table-layout: fixed;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-checkbox {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-radio {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn > .table-contain > table .table-expandable {\n left: 0;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-radio.paraui-v4-table-check .table-radio {\n left: 48px;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-expandable.paraui-v4-table-check .table-expandable {\n left: 48px;\n}\n.paraui-v4-table.paraui-v4-table-fixed-cloumn.paraui-v4-table-expandable.paraui-v4-table-check.paraui-v4-table-radio .table-expandable {\n left: 80px;\n}\n.paraui-v4-table.paraui-v4-table-no-data > .table-container > table {\n height: 100%;\n}\n.paraui-v4-table.paraui-v4-table-no-data > .table-container > table .paraui-v4-empty {\n overflow: hidden;\n}\n.paraui-v4-table.paraui-v4-table-load.paraui-v4-table-no-data > .table-container > table {\n height: auto;\n}\n.paraui-v4-table.paraui-v4-table-pagination > .table-contain {\n height: calc(100% - 36px);\n}\n.paraui-v4-table.paraui-v4-table-pagination.table-load-more > .table-contain {\n height: 100%;\n}\n.paraui-v4-table.paraui-v4-table-load-more.paraui-v4-table-pagination > .table-contain {\n height: 100%;\n}\n.paraui-v4-table > .table-contain {\n height: 100%;\n position: relative;\n}\n.paraui-v4-table > .table-contain > table {\n height: auto;\n}\n.paraui-v4-table > .table-contain > table .table-checkbox > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-checkbox .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-radio > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-radio .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table .table-expandable > svg {\n vertical-align: middle;\n}\n.paraui-v4-table > .table-contain > table > .table-head {\n width: 100%;\n white-space: nowrap;\n}\n.paraui-v4-table > .table-contain > table > .table-head > tr th {\n height: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-head.table-head-scroll tr th {\n max-width: 240px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-serial-number .table-header-box .table-header-title {\n padding-right: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box {\n height: 47px;\n line-height: 47px;\n position: relative;\n padding: 0 8px;\n display: flex;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-title {\n max-width: 100%;\n display: flex;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-header-title-label {\n width: 100%;\n color: rgb(92, 101, 115);\n font-weight: 700;\n font-size: 14px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span {\n width: 20px;\n height: 20px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n border-radius: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover {\n background-color: rgba(46, 101, 230, 0.1);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > svg {\n font-size: 12px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .up-svg {\n position: relative;\n top: 3px;\n transform: scale(0.8);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .down-svg {\n position: relative;\n top: -3px;\n transform: scale(0.8);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span {\n width: 20px;\n height: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n cursor: pointer;\n border-radius: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover {\n background-color: rgba(46, 101, 230, 0.1);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span > svg {\n font-size: 14px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show > span > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > span > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > span:after {\n position: absolute;\n width: 4px;\n height: 4px;\n border-radius: 50%;\n background-color: rgb(244, 66, 66);\n content: \"\";\n right: 3px;\n top: 2px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort > .table-header-title {\n padding-right: 8px;\n max-width: calc(100% - 20px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-filter > .table-header-title {\n padding-right: 8px;\n max-width: calc(100% - 20px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort.table-header-box-filter > .table-header-title {\n max-width: calc(100% - 40px);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-asc > .table-sort-svg > span > .up-svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-desc > .table-sort-svg > span > .down-svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums {\n width: 53px;\n cursor: pointer;\n border-left: 1px solid rgb(234, 236, 241);\n right: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box > svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-table > .table-contain > table > .table-head .show-colums .table-header-box:hover > svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-head.table-head-no-btn tr th:first-child .table-header-box {\n padding-left: 20px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn > .table-header-box {\n width: 32px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn:first-child {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-head .table-head-btn:first-child > .table-header-box {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-body {\n width: 100%;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-scroll tr td {\n max-width: 240px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td {\n background-color: white;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate {\n padding-right: 16px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr:nth-of-type(2n) td {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr:hover td {\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > svg {\n transition: all 0.3s;\n cursor: pointer;\n font-size: 18px;\n color: rgb(92, 101, 115);\n transform: rotate(270deg);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > svg:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-table > .table-contain > table > .table-body tr .table-expandable > .expand {\n transform: rotate(360deg);\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row {\n cursor: pointer;\n position: sticky;\n bottom: 0;\n z-index: 10;\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row .more-btn {\n color: rgb(46, 101, 230);\n font-size: 14px;\n}\n.paraui-v4-table > .table-contain > table > .table-body .more-table-row > .td-element {\n position: relative;\n background: white;\n box-shadow: 4px -4px 8px 0px rgb(234, 236, 241);\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn tr td:first-child {\n padding-left: 20px;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn tr.more-table-row td:first-child {\n padding-left: 8px;\n}\n.paraui-v4-table > .table-contain > table > .table-body.table-body-no-btn > .table-no-data > td:first-child {\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-body .table-body-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v4-table > .table-contain > table > .table-body .table-body-btn:first-child {\n width: 48px;\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data {\n height: calc(100% - 50px);\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data:hover td {\n background-color: white;\n}\n.paraui-v4-table > .table-contain > table > .table-body > .table-no-data > td {\n padding: 56px 0 0 0;\n}\n.paraui-v4-table > .table-contain > .table-pos-line {\n position: absolute;\n top: 0;\n width: 1px;\n background-color: rgb(46, 101, 230);\n z-index: 1000;\n}\n.paraui-v4-table > .table-pagination {\n width: 100%;\n height: 36px;\n display: flex;\n align-items: flex-end;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right {\n display: flex;\n height: 32px;\n align-items: center;\n color: rgb(29, 33, 38);\n line-height: 32px;\n padding-left: 16px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .all-select {\n margin-left: 12px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .line {\n width: 1px;\n height: 12px;\n background-color: rgb(212, 218, 227);\n margin: 0 10px;\n}\n.paraui-v4-table > .table-pagination .table-pagination-right .check-number {\n width: 65px;\n display: inline-block;\n}\n.paraui-v4-table > .table-pagination .table-pagination-com {\n flex: 1;\n justify-content: flex-end;\n}\n.paraui-v4-table > .table-pagination .refresh-btn {\n margin-left: 20px;\n}\n\n.paraui-v4-table-show-colums-popover > .component-popover-content {\n min-width: 200px;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box {\n padding-top: 4px;\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item {\n height: 30px;\n line-height: 30px;\n cursor: pointer;\n display: flex;\n padding: 0 10px;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > span {\n padding-left: 8px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 14px);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover {\n background: rgb(247, 248, 250);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled {\n cursor: inherit;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled > span {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-disabled:hover {\n background: transparent;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer {\n height: 36px;\n border-top: 1px solid rgb(247, 248, 250);\n text-align: center;\n}\n.paraui-v4-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button {\n width: 100%;\n height: 100%;\n margin: 0;\n}\n\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box {\n padding-top: 4px;\n max-height: 320px;\n overflow-y: auto;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item {\n height: 30px;\n line-height: 30px;\n cursor: pointer;\n display: flex;\n padding: 0 10px;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > label {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > span {\n padding-left: 8px;\n color: rgb(29, 33, 38);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 14px);\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item:hover {\n background: rgb(247, 248, 250);\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-footer {\n height: 36px;\n border-top: 1px solid rgb(247, 248, 250);\n text-align: center;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button {\n width: 50%;\n height: 100%;\n margin: 0;\n}\n.paraui-v4-filter-popover > .component-popover-content .filter-select.filter-select-none {\n text-align: center;\n padding: 20px 0;\n}\n.paraui-v4-filter-popover.paraui-v4-filter-popover-default > .component-popover-content {\n min-width: 200px;\n}";
1775
1775
  styleInject(css_248z);
1776
1776
 
1777
- var Table = function Table(propsInit) {
1778
- var props = useGlobalProps(propsInit, 'Table');
1777
+ const Table = propsInit => {
1778
+ const props = useGlobalProps(propsInit, 'Table');
1779
1779
  // 判断浏览器
1780
- var Browser = GetBrowserClass();
1780
+ const Browser = GetBrowserClass();
1781
1781
  if (Browser === 'ie') {
1782
1782
  // IE浏览器没有固定列
1783
1783
  props.fixedColumn = false;
1784
1784
  }
1785
- var className = props.className,
1786
- style = props.style,
1787
- url = props.url,
1788
- ctx = props.ctx,
1789
- emptyProps = props.emptyProps,
1790
- _props$method = props.method,
1791
- method = _props$method === void 0 ? 'Get' : _props$method,
1792
- data = props.data,
1793
- _props$page = props.page,
1794
- page = _props$page === void 0 ? 1 : _props$page,
1795
- _props$size = props.size,
1796
- size = _props$size === void 0 ? 10 : _props$size,
1797
- _props$sizeArr = props.sizeArr,
1798
- sizeArr = _props$sizeArr === void 0 ? [10, 20, 50, 100] : _props$sizeArr,
1799
- search = props.search,
1800
- _props$pagination = props.pagination,
1801
- pagination = _props$pagination === void 0 ? true : _props$pagination,
1802
- _props$paginationType = props.paginationType,
1803
- paginationType = _props$paginationType === void 0 ? 'complex' : _props$paginationType,
1804
- flippingArrow = props.flippingArrow,
1805
- _props$autoPagination = props.autoPagination,
1806
- autoPagination = _props$autoPagination === void 0 ? true : _props$autoPagination,
1807
- tableCell = props.tableCell,
1808
- requestCallback = props.requestCallback,
1809
- checkDefaultValue = props.checkDefaultValue,
1810
- setCheck = props.setCheck,
1811
- radioDefaultValue = props.radioDefaultValue,
1812
- setRadio = props.setRadio,
1813
- refresh = props.refresh,
1814
- disabledArr = props.disabledArr,
1815
- disabledArrStatus = props.disabledArrStatus,
1816
- _props$headData = props.headData,
1817
- headData = _props$headData === void 0 ? [] : _props$headData,
1818
- sortTableRadio = props.sortTableRadio,
1819
- _props$sortTable = props.sortTable,
1820
- sortTable = _props$sortTable === void 0 ? false : _props$sortTable,
1821
- _props$filter = props.filter,
1822
- filter = _props$filter === void 0 ? false : _props$filter,
1823
- expandable = props.expandable,
1824
- _props$rowKey = props.rowKey,
1825
- rowKey = _props$rowKey === void 0 ? 'key' : _props$rowKey,
1826
- _props$check = props.check,
1827
- check = _props$check === void 0 ? false : _props$check,
1828
- _props$radio = props.radio,
1829
- radio = _props$radio === void 0 ? false : _props$radio,
1830
- _props$checkRememberP = props.checkRememberPage,
1831
- checkRememberPage = _props$checkRememberP === void 0 ? false : _props$checkRememberP,
1832
- _props$align = props.align,
1833
- align = _props$align === void 0 ? 'left' : _props$align,
1834
- paramsCallback = props.paramsCallback,
1835
- operate = props.operate,
1836
- _props$showColumns = props.showColumns,
1837
- showColumns = _props$showColumns === void 0 ? 'inside' : _props$showColumns,
1838
- _props$fixedTable = props.fixedTable,
1839
- fixedTable = _props$fixedTable === void 0 ? true : _props$fixedTable,
1840
- _props$fixedColumn = props.fixedColumn,
1841
- fixedColumn = _props$fixedColumn === void 0 ? true : _props$fixedColumn,
1842
- _props$dragColumn = props.dragColumn,
1843
- dragColumn = _props$dragColumn === void 0 ? true : _props$dragColumn,
1844
- formatter = props.formatter,
1845
- _props$lineHeight = props.lineHeight,
1846
- lineHeight = _props$lineHeight === void 0 ? 48 : _props$lineHeight,
1847
- _props$lineWidth = props.lineWidth,
1848
- lineWidth = _props$lineWidth === void 0 ? 80 : _props$lineWidth,
1849
- _props$autoSize = props.autoSize,
1850
- autoSize = _props$autoSize === void 0 ? true : _props$autoSize,
1851
- _props$loadMore = props.loadMore,
1852
- loadMore = _props$loadMore === void 0 ? false : _props$loadMore,
1853
- loadMoreRender = props.loadMoreRender,
1854
- onClickMore = props.onClickMore,
1855
- expandValue = props.expandValue,
1856
- expandMultiple = props.expandMultiple,
1857
- disabledExpand = props.disabledExpand,
1858
- onExpand = props.onExpand,
1859
- _props$defaultExpandA = props.defaultExpandAllRows,
1860
- defaultExpandAllRows = _props$defaultExpandA === void 0 ? false : _props$defaultExpandA,
1861
- onClickColumns = props.onClickColumns,
1862
- _props$beyondText = props.beyondText,
1863
- beyondText = _props$beyondText === void 0 ? true : _props$beyondText,
1864
- _props$tipMaxWidth = props.tipMaxWidth,
1865
- tipMaxWidth = _props$tipMaxWidth === void 0 ? 500 : _props$tipMaxWidth,
1866
- loading = props.loading,
1867
- defaultSortValue = props.defaultSortValue,
1868
- defaultFilterValue = props.defaultFilterValue,
1869
- searchKeyName = props.searchKeyName,
1870
- filterSearchCallback = props.filterSearchCallback,
1871
- onClickRow = props.onClickRow,
1872
- rowClassMapping = props.rowClassMapping,
1873
- getPopupContainer = props.getPopupContainer,
1874
- onSort = props.onSort,
1875
- onError = props.onError,
1876
- _props$refreshInside = props.refreshInside,
1877
- refreshInside = _props$refreshInside === void 0 ? props.url ? true : false : _props$refreshInside,
1878
- _props$checkCount = props.checkCount,
1879
- checkCount = _props$checkCount === void 0 ? props.check ? true : false : _props$checkCount;
1880
- var intl = useFormatMessage('Table', localeJson);
1881
- var dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
1882
- var _useState = useState(props.page !== undefined ? props.page : 1),
1883
- _useState2 = _slicedToArray(_useState, 2),
1884
- pageCom = _useState2[0],
1885
- setPageCom = _useState2[1]; // 页数
1886
- var _useState3 = useState(null),
1887
- _useState4 = _slicedToArray(_useState3, 2),
1888
- sizeCom = _useState4[0],
1889
- setSizeCom = _useState4[1]; // 每页条数
1890
- var _useState5 = useState(sizeArr),
1891
- _useState6 = _slicedToArray(_useState5, 2),
1892
- sizeArrCom = _useState6[0],
1893
- setSizeArrCom = _useState6[1]; // 每页条数数组
1894
- var _useState7 = useState(0),
1895
- _useState8 = _slicedToArray(_useState7, 2),
1896
- total = _useState8[0],
1897
- setTotal = _useState8[1]; // 总数
1898
- var _useState9 = useState([]),
1899
- _useState10 = _slicedToArray(_useState9, 2),
1900
- rowData = _useState10[0],
1901
- setRowData = _useState10[1]; // 当前页数据
1902
- var _useState11 = useState({}),
1903
- _useState12 = _slicedToArray(_useState11, 2),
1904
- rowDataJson = _useState12[0],
1905
- setRowDataJson = _useState12[1]; // 当前页数据对象
1906
- var _useState13 = useState({}),
1907
- _useState14 = _slicedToArray(_useState13, 2),
1908
- totalDataJson = _useState14[0],
1909
- setTotalDataJson = _useState14[1]; // 数据总数对象--用来分页记录数据的
1910
- var _useState15 = useState(Object.values(defaultSortValue || {})),
1911
- _useState16 = _slicedToArray(_useState15, 2),
1912
- orderTypeArr = _useState16[0],
1913
- setOrderTypeArr = _useState16[1]; // 排序类型
1914
- var _useState17 = useState(Object.keys(defaultSortValue || {})),
1915
- _useState18 = _slicedToArray(_useState17, 2),
1916
- orderFieldArr = _useState18[0],
1917
- setOrderFieldArr = _useState18[1]; // 排序字段
1918
- var _useState19 = useState('not'),
1919
- _useState20 = _slicedToArray(_useState19, 2),
1920
- headSelectStatus = _useState20[0],
1921
- setHeadSelectStatus = _useState20[1]; // 表格头复选框状态
1922
- var _useState21 = useState({}),
1923
- _useState22 = _slicedToArray(_useState21, 2),
1924
- checkJson = _useState22[0],
1925
- setCheckJson = _useState22[1]; // 多选 选中的数据
1926
- var _useState23 = useState(),
1927
- _useState24 = _slicedToArray(_useState23, 2),
1928
- radioValue = _useState24[0],
1929
- setRadioValue = _useState24[1]; // 单选 选中的数据
1930
- var _useState25 = useState({}),
1931
- _useState26 = _slicedToArray(_useState25, 2),
1932
- disabledJson = _useState26[0],
1933
- setDisabledJson = _useState26[1]; // 禁用对象
1934
- var _useState27 = useState({}),
1935
- _useState28 = _slicedToArray(_useState27, 2),
1936
- originalHead = _useState28[0],
1937
- setOriginalHead = _useState28[1]; // 接口原数据表头json
1938
- var _useState29 = useState([]),
1939
- _useState30 = _slicedToArray(_useState29, 2),
1940
- showHeadList = _useState30[0],
1941
- setShowHeadList = _useState30[1]; // 显示列下拉值 所有头部的配置
1942
- var _useState31 = useState([]),
1943
- _useState32 = _slicedToArray(_useState31, 2),
1944
- headDataCom = _useState32[0],
1945
- setHeadDataCom = _useState32[1]; // 表格当前显示列 集合本地数据
1946
- var _useState33 = useState(Object.assign({}, defaultFilterValue)),
1947
- _useState34 = _slicedToArray(_useState33, 2),
1948
- selectFilterCom = _useState34[0],
1949
- setSelectFilterCom = _useState34[1]; // 过滤值
1950
- var _useState35 = useState(true),
1951
- _useState36 = _slicedToArray(_useState35, 2),
1952
- loadState = _useState36[0],
1953
- setLoadState = _useState36[1]; // 加载进度条状态
1954
- var _useState37 = useState(false),
1955
- _useState38 = _slicedToArray(_useState37, 2),
1956
- loadMoreUrl = _useState38[0],
1957
- setLoadMoreUrl = _useState38[1];
1958
- var _useState39 = useState(Math.random().toString()),
1959
- _useState40 = _slicedToArray(_useState39, 1),
1960
- reqId = _useState40[0];
1961
- var _useState41 = useState(),
1962
- _useState42 = _slicedToArray(_useState41, 2),
1963
- refreshCom = _useState42[0],
1964
- setRefreshCom = _useState42[1];
1965
- var _useState43 = useState(0),
1966
- _useState44 = _slicedToArray(_useState43, 2),
1967
- tableMinWidth = _useState44[0],
1968
- setTableMinWidth = _useState44[1]; // 表格最小width
1969
- var _useState45 = useState({}),
1970
- _useState46 = _slicedToArray(_useState45, 2),
1971
- posFixed = _useState46[0],
1972
- setPosFixed = _useState46[1]; // 固定位置
1973
- var _useState47 = useState({}),
1974
- _useState48 = _slicedToArray(_useState47, 2),
1975
- headDataConfig = _useState48[0],
1976
- setHeadDataConfig = _useState48[1]; // 表头配置
1977
- var containerRef = useRef(); // 表格内容高度
1978
- var tableRef = useRef(); // 表格
1979
- var constData = useRef({
1785
+ const {
1786
+ className,
1787
+ style,
1788
+ url,
1789
+ ctx,
1790
+ emptyProps,
1791
+ method = 'Get',
1792
+ data,
1793
+ page = 1,
1794
+ size = 10,
1795
+ sizeArr = [10, 20, 50, 100],
1796
+ search,
1797
+ pagination = true,
1798
+ paginationType = 'complex',
1799
+ flippingArrow,
1800
+ autoPagination = true,
1801
+ tableCell,
1802
+ requestCallback,
1803
+ checkDefaultValue,
1804
+ setCheck,
1805
+ radioDefaultValue,
1806
+ setRadio,
1807
+ refresh,
1808
+ disabledArr,
1809
+ disabledArrStatus,
1810
+ headData = [],
1811
+ sortTableRadio,
1812
+ sortTable = false,
1813
+ filter = false,
1814
+ expandable,
1815
+ rowKey = 'key',
1816
+ check = false,
1817
+ radio = false,
1818
+ checkRememberPage = false,
1819
+ align = 'left',
1820
+ paramsCallback,
1821
+ operate,
1822
+ showColumns = 'inside',
1823
+ fixedTable = true,
1824
+ fixedColumn = true,
1825
+ dragColumn = true,
1826
+ formatter,
1827
+ lineHeight = 48,
1828
+ lineWidth = 80,
1829
+ autoSize = true,
1830
+ loadMore = false,
1831
+ loadMoreRender,
1832
+ onClickMore,
1833
+ expandValue,
1834
+ expandMultiple,
1835
+ disabledExpand,
1836
+ onExpand,
1837
+ defaultExpandAllRows = false,
1838
+ onClickColumns,
1839
+ beyondText = true,
1840
+ tipMaxWidth = 500,
1841
+ loading,
1842
+ defaultSortValue,
1843
+ defaultFilterValue,
1844
+ searchKeyName,
1845
+ filterSearchCallback,
1846
+ onClickRow,
1847
+ rowClassMapping,
1848
+ getPopupContainer,
1849
+ onSort,
1850
+ onError,
1851
+ refreshInside = props.url ? true : false,
1852
+ checkCount = props.check ? true : false
1853
+ } = props;
1854
+ const intl = useFormatMessage('Table', localeJson);
1855
+ const dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
1856
+ const [pageCom, setPageCom] = useState(props.page !== undefined ? props.page : 1); // 页数
1857
+ const [sizeCom, setSizeCom] = useState(null); // 每页条数
1858
+ const [sizeArrCom, setSizeArrCom] = useState(sizeArr); // 每页条数数组
1859
+ const [total, setTotal] = useState(0); // 总数
1860
+ const [rowData, setRowData] = useState([]); // 当前页数据
1861
+ const [rowDataJson, setRowDataJson] = useState({}); // 当前页数据对象
1862
+ const [totalDataJson, setTotalDataJson] = useState({}); // 数据总数对象--用来分页记录数据的
1863
+ const [orderTypeArr, setOrderTypeArr] = useState(Object.values(defaultSortValue || {})); // 排序类型
1864
+ const [orderFieldArr, setOrderFieldArr] = useState(Object.keys(defaultSortValue || {})); // 排序字段
1865
+ const [headSelectStatus, setHeadSelectStatus] = useState('not'); // 表格头复选框状态
1866
+ const [checkJson, setCheckJson] = useState({}); // 多选 选中的数据
1867
+ const [radioValue, setRadioValue] = useState(); // 单选 选中的数据
1868
+ const [disabledJson, setDisabledJson] = useState({}); // 禁用对象
1869
+ const [originalHead, setOriginalHead] = useState({}); // 接口原数据表头json
1870
+ const [showHeadList, setShowHeadList] = useState([]); // 显示列下拉值 所有头部的配置
1871
+ const [headDataCom, setHeadDataCom] = useState([]); // 表格当前显示列 集合本地数据
1872
+ const [selectFilterCom, setSelectFilterCom] = useState(Object.assign({}, defaultFilterValue)); // 过滤值
1873
+ const [loadState, setLoadState] = useState(true); // 加载进度条状态
1874
+ const [loadMoreUrl, setLoadMoreUrl] = useState(false);
1875
+ const [reqId] = useState(Math.random().toString());
1876
+ const [refreshCom, setRefreshCom] = useState();
1877
+ const [tableMinWidth, setTableMinWidth] = useState(0); // 表格最小width
1878
+ const [posFixed, setPosFixed] = useState({}); // 固定位置
1879
+ const [headDataConfig, setHeadDataConfig] = useState({}); // 表头配置
1880
+ const containerRef = useRef(); // 表格内容高度
1881
+ const tableRef = useRef(); // 表格
1882
+ const constData = useRef({
1980
1883
  page: props.page !== undefined ? props.page : 1,
1981
1884
  headDataConfig: {}
1982
1885
  }); // 存储常量
@@ -1990,9 +1893,9 @@ var Table = function Table(propsInit) {
1990
1893
  constData.current.searchKeyName = searchKeyName;
1991
1894
  constData.current.filterSearchCallback = filterSearchCallback;
1992
1895
  constData.current.onError = onError;
1993
- useEffect(function () {
1896
+ useEffect(() => {
1994
1897
  window.addEventListener('resize', changeResize);
1995
- return function () {
1898
+ return () => {
1996
1899
  constData.current.isDestroy = true;
1997
1900
  clearTimeout(constData.current.reqTimer);
1998
1901
  clearTimeout(constData.current.loadingTimer);
@@ -2000,69 +1903,72 @@ var Table = function Table(propsInit) {
2000
1903
  window.removeEventListener('resize', changeResize);
2001
1904
  };
2002
1905
  }, []);
2003
- useEffect(function () {
1906
+ useEffect(() => {
2004
1907
  if (loading !== undefined) {
2005
1908
  clearTimeout(constData.current.loadingTimer);
2006
- constData.current.loadingTimer = setTimeout(function () {
1909
+ constData.current.loadingTimer = setTimeout(() => {
2007
1910
  setLoadState(loading);
2008
1911
  }, 50);
2009
1912
  }
2010
1913
  }, [loading]);
2011
- useEffect(function () {
1914
+ useEffect(() => {
2012
1915
  setLoadMoreUrl(Boolean(loadMore && url));
2013
1916
  }, [loadMore, url]);
2014
1917
  // 监听page
2015
- useEffect(function () {
1918
+ useEffect(() => {
2016
1919
  if (props.page !== undefined) {
2017
1920
  handPage(props.page);
2018
1921
  }
2019
1922
  }, [page]);
2020
1923
  // 自动计算表格一页展示条数
2021
- useEffect(function () {
1924
+ useEffect(() => {
2022
1925
  if (!autoSize) return handSize(size);
2023
1926
  if (props.size) {
2024
1927
  handSize(size);
2025
1928
  } else {
2026
1929
  if (containerRef && containerRef.current) {
2027
- var height = containerRef.current.clientHeight - 50;
1930
+ let height = containerRef.current.clientHeight - 48;
2028
1931
  if (props.loadMore) height -= lineHeight;
2029
- var num = Math.floor(height / lineHeight);
2030
- var columnsNUmber = num < 1 ? size : num;
1932
+ let num = Math.floor(height / lineHeight);
1933
+ /*// 取余大于0.5,加一条
1934
+ const numRemainder = height % lineHeight / lineHeight;
1935
+ if (numRemainder > 0.5) num += 1;*/
1936
+ const columnsNUmber = num < 1 ? size : num;
2031
1937
  if (sizeArr.indexOf(columnsNUmber) === -1) {
2032
1938
  sizeArr.unshift(columnsNUmber);
2033
1939
  // 数组排序
2034
- sizeArr.sort(function (a, b) {
1940
+ sizeArr.sort((a, b) => {
2035
1941
  return a - b;
2036
1942
  });
2037
- setSizeArrCom(_toConsumableArray(sizeArr));
1943
+ setSizeArrCom([...sizeArr]);
2038
1944
  }
2039
1945
  handSize(columnsNUmber);
2040
1946
  }
2041
1947
  }
2042
1948
  }, [size, autoSize]);
2043
1949
  // 处理表格头部
2044
- useEffect(function () {
1950
+ useEffect(() => {
2045
1951
  if (props.headData !== undefined) {
2046
1952
  handInitHead(headData, false);
2047
1953
  }
2048
1954
  }, [headData]);
2049
1955
  // 设置总数对象
2050
- useEffect(function () {
1956
+ useEffect(() => {
2051
1957
  if (data) {
2052
1958
  constData.current.historyData = [];
2053
- var dataHand = handLocalData();
2054
- var handTotalDataJson = ArrayToObject(rowKey, dataHand);
1959
+ const dataHand = handLocalData();
1960
+ const handTotalDataJson = ArrayToObject(rowKey, dataHand);
2055
1961
  setTotalDataJson(handTotalDataJson);
2056
1962
  setRefreshCom(Math.random());
2057
1963
  }
2058
1964
  }, [data]);
2059
- useEffect(function () {
1965
+ useEffect(() => {
2060
1966
  // 第一次初始化不设置
2061
1967
  if (!constData.current.initReq) return;
2062
1968
  handPage(1);
2063
1969
  constData.current.historyData = [];
2064
1970
  }, [search, url]);
2065
- useEffect(function () {
1971
+ useEffect(() => {
2066
1972
  if (constData.current.loadMoreUrl) {
2067
1973
  constData.current.historyData = [];
2068
1974
  handPage(1);
@@ -2071,14 +1977,14 @@ var Table = function Table(propsInit) {
2071
1977
  }
2072
1978
  }, [refresh]);
2073
1979
  // 表格数据获取赋值
2074
- useEffect(function () {
1980
+ useEffect(() => {
2075
1981
  clearTimeout(constData.current.reqTimer);
2076
1982
  if (constData.current.url) Cancel(reqId);
2077
- constData.current.reqTimer = setTimeout(function () {
1983
+ constData.current.reqTimer = setTimeout(() => {
2078
1984
  constData.current.initReq = true;
2079
1985
  if (constData.current.url) {
2080
1986
  // 提交参数
2081
- var postBody = {};
1987
+ let postBody = {};
2082
1988
  if (pagination) {
2083
1989
  if (constData.current.page === null || constData.current.size === null) return;
2084
1990
  postBody.size = constData.current.size;
@@ -2094,54 +2000,54 @@ var Table = function Table(propsInit) {
2094
2000
  }
2095
2001
  }
2096
2002
  if (selectFilterCom && Object.keys(selectFilterCom).length > 0) {
2097
- var filterValue = handFilterReq();
2003
+ const filterValue = handFilterReq();
2098
2004
  if (Object.keys(filterValue).length > 0) postBody.filter = filterValue;
2099
2005
  }
2100
2006
  if (constData.current.search) {
2101
- if (_typeof(constData.current.search) === 'object') {
2007
+ if (typeof constData.current.search === 'object') {
2102
2008
  postBody = Object.assign(Object.assign({}, postBody), constData.current.search);
2103
2009
  }
2104
2010
  }
2105
- var obj = {
2011
+ const obj = {
2106
2012
  url: constData.current.url,
2107
- ctx: ctx,
2108
- method: method,
2013
+ ctx,
2014
+ method,
2109
2015
  data: postBody
2110
2016
  };
2111
2017
  // get 请求
2112
2018
  if (method === 'Get') {
2113
2019
  if (paramsCallback) {
2114
- paramsCallback(obj, function (handObj) {
2115
- var handUrl = handGetReqParams(handObj);
2020
+ paramsCallback(obj, handObj => {
2021
+ const handUrl = handGetReqParams(handObj);
2116
2022
  requestData(Object.assign(Object.assign({}, handObj), {
2117
2023
  url: handUrl,
2118
- ctx: ctx,
2119
- method: method
2024
+ ctx,
2025
+ method
2120
2026
  }));
2121
2027
  });
2122
2028
  } else {
2123
- var handUrl = handGetReqParams(obj);
2029
+ const handUrl = handGetReqParams(obj);
2124
2030
  requestData({
2125
2031
  url: handUrl,
2126
- ctx: ctx,
2127
- method: method
2032
+ ctx,
2033
+ method
2128
2034
  });
2129
2035
  }
2130
2036
  }
2131
2037
  // post 请求
2132
2038
  if (method === 'Post') {
2133
- if (paramsCallback) paramsCallback(obj, function (handObj) {
2039
+ if (paramsCallback) paramsCallback(obj, handObj => {
2134
2040
  requestData(handObj);
2135
2041
  });else requestData(obj);
2136
2042
  }
2137
2043
  }
2138
2044
  if (constData.current.data) {
2139
- var dataT = handLocalData();
2045
+ let dataT = handLocalData();
2140
2046
  dataT = filterSearchData(dataT); // 过滤数据
2141
2047
  if (pagination) {
2142
2048
  if (constData.current.page === null || constData.current.size === null) return;
2143
2049
  // 分页
2144
- var sliceData = dataT.slice((constData.current.page - 1) * constData.current.size, (constData.current.page - 1) * constData.current.size + constData.current.size);
2050
+ const sliceData = dataT.slice((constData.current.page - 1) * constData.current.size, (constData.current.page - 1) * constData.current.size + constData.current.size);
2145
2051
  setNowPageData(sliceData);
2146
2052
  setTotal(dataT.length);
2147
2053
  } else {
@@ -2153,47 +2059,47 @@ var Table = function Table(propsInit) {
2153
2059
  }, 50);
2154
2060
  }, [refreshCom]);
2155
2061
  // 单选赋值默认值
2156
- useEffect(function () {
2062
+ useEffect(() => {
2157
2063
  if (radioDefaultValue !== undefined && radioDefaultValue !== radioValue) {
2158
2064
  setRadioValue(radioDefaultValue);
2159
2065
  }
2160
2066
  }, [radioDefaultValue]);
2161
2067
  // 复选框赋默认值
2162
- useEffect(function () {
2068
+ useEffect(() => {
2163
2069
  if (checkDefaultValue) {
2164
- var json = {};
2165
- for (var i = 0, l = checkDefaultValue.length; i < l; i++) {
2166
- var item = checkDefaultValue[i];
2070
+ const json = {};
2071
+ for (let i = 0, l = checkDefaultValue.length; i < l; i++) {
2072
+ const item = checkDefaultValue[i];
2167
2073
  json[item] = true;
2168
2074
  }
2169
2075
  setCheckJson(json);
2170
2076
  }
2171
2077
  }, [checkDefaultValue]);
2172
2078
  // 设置禁用对象
2173
- useEffect(function () {
2079
+ useEffect(() => {
2174
2080
  if (disabledArr) {
2175
- var json = {};
2176
- for (var i = 0, l = disabledArr.length; i < l; i++) {
2177
- var item = disabledArr[i];
2081
+ const json = {};
2082
+ for (let i = 0, l = disabledArr.length; i < l; i++) {
2083
+ const item = disabledArr[i];
2178
2084
  json[item] = true;
2179
2085
  }
2180
2086
  setDisabledJson(json);
2181
2087
  }
2182
2088
  }, [disabledArr]);
2183
2089
  // 计算复选框状态
2184
- useEffect(function () {
2090
+ useEffect(() => {
2185
2091
  if (Object.keys(checkJson).length === 0) {
2186
2092
  // 全不选
2187
2093
  setHeadSelectStatus('not');
2188
2094
  } else {
2189
- var arr = Object.keys(rowDataJson);
2095
+ const arr = Object.keys(rowDataJson);
2190
2096
  if (arr.length === 0) {
2191
2097
  return setHeadSelectStatus('not');
2192
2098
  }
2193
- var numTotal = arr.length;
2194
- var num = 0;
2195
- for (var i = 0, l = arr.length; i < l; i++) {
2196
- var key = arr[i];
2099
+ let numTotal = arr.length;
2100
+ let num = 0;
2101
+ for (let i = 0, l = arr.length; i < l; i++) {
2102
+ const key = arr[i];
2197
2103
  if (disabledJson[key]) {
2198
2104
  numTotal--;
2199
2105
  } else {
@@ -2217,13 +2123,13 @@ var Table = function Table(propsInit) {
2217
2123
  }
2218
2124
  }, [checkJson, rowData, disabledJson]);
2219
2125
  // 表格更新计算是否有滚动条
2220
- useEffect(function () {
2126
+ useEffect(() => {
2221
2127
  tableBoxScroll({
2222
2128
  target: containerRef.current
2223
2129
  });
2224
2130
  });
2225
2131
  /** 设置size */
2226
- var handSize = function handSize(num) {
2132
+ const handSize = num => {
2227
2133
  constData.current.size = num;
2228
2134
  setSizeCom(num);
2229
2135
  setRefreshCom(Math.random());
@@ -2231,15 +2137,15 @@ var Table = function Table(propsInit) {
2231
2137
  /**
2232
2138
  * 处理page
2233
2139
  * */
2234
- var handPage = function handPage(num) {
2140
+ const handPage = num => {
2235
2141
  constData.current.page = num;
2236
2142
  setPageCom(num);
2237
2143
  setRefreshCom(Math.random());
2238
2144
  };
2239
2145
  /** 处理本地data */
2240
- var handLocalData = function handLocalData() {
2146
+ const handLocalData = () => {
2241
2147
  var _a;
2242
- var dataT = [];
2148
+ let dataT = [];
2243
2149
  if (constData.current.data instanceof Array) {
2244
2150
  dataT = constData.current.data;
2245
2151
  } else {
@@ -2248,12 +2154,12 @@ var Table = function Table(propsInit) {
2248
2154
  return dataT;
2249
2155
  };
2250
2156
  /** 本地数据过滤搜索数据 */
2251
- var filterSearchData = function filterSearchData(arr) {
2252
- var filterKeys = Object.keys(constData.current.selectFilterCom || {});
2253
- var handArr = [];
2254
- for (var i = 0, l = arr.length; i < l; i++) {
2255
- var item = arr[i];
2256
- var bol = true;
2157
+ const filterSearchData = arr => {
2158
+ const filterKeys = Object.keys(constData.current.selectFilterCom || {});
2159
+ const handArr = [];
2160
+ for (let i = 0, l = arr.length; i < l; i++) {
2161
+ const item = arr[i];
2162
+ let bol = true;
2257
2163
  if (constData.current.filterSearchCallback) {
2258
2164
  // 自定义过滤方法
2259
2165
  bol = constData.current.filterSearchCallback(item, {
@@ -2262,10 +2168,10 @@ var Table = function Table(propsInit) {
2262
2168
  });
2263
2169
  } else {
2264
2170
  // 过滤条件
2265
- for (var j = 0, k = filterKeys.length; j < k; j++) {
2266
- var name = filterKeys[j];
2267
- var filterVal = constData.current.selectFilterCom[name];
2268
- var val = item[name];
2171
+ for (let j = 0, k = filterKeys.length; j < k; j++) {
2172
+ const name = filterKeys[j];
2173
+ const filterVal = constData.current.selectFilterCom[name];
2174
+ const val = item[name];
2269
2175
  // 不满足当前过滤的数据,过滤掉
2270
2176
  if (filterVal.length > 0 && filterVal.indexOf(val) === -1) {
2271
2177
  bol = false;
@@ -2282,15 +2188,15 @@ var Table = function Table(propsInit) {
2282
2188
  return handArr;
2283
2189
  };
2284
2190
  /** 处理本地搜索, 返回true满足搜索条件 */
2285
- var handLocalSearch = function handLocalSearch(item) {
2286
- var searchKey;
2191
+ const handLocalSearch = item => {
2192
+ let searchKey;
2287
2193
  if (constData.current.search && typeof constData.current.search !== 'string' && constData.current.search.searchKey) {
2288
2194
  searchKey = constData.current.search.searchKey;
2289
2195
  }
2290
2196
  if (searchKey !== undefined && constData.current.searchKeyName && constData.current.searchKeyName.length > 0) {
2291
- for (var i = 0, l = constData.current.searchKeyName.length; i < l; i++) {
2292
- var name = constData.current.searchKeyName[i];
2293
- var nameVal = item[name];
2197
+ for (let i = 0, l = constData.current.searchKeyName.length; i < l; i++) {
2198
+ const name = constData.current.searchKeyName[i];
2199
+ const nameVal = item[name];
2294
2200
  if (nameVal.indexOf(searchKey) !== -1) {
2295
2201
  // 存在一项就满足
2296
2202
  return true;
@@ -2302,7 +2208,7 @@ var Table = function Table(propsInit) {
2302
2208
  return false;
2303
2209
  };
2304
2210
  /** 本地显示列key */
2305
- var getTableHeadKey = function getTableHeadKey() {
2211
+ const getTableHeadKey = () => {
2306
2212
  // 自定义key
2307
2213
  if (props.tableKey) {
2308
2214
  return props.tableKey;
@@ -2318,19 +2224,19 @@ var Table = function Table(propsInit) {
2318
2224
  return '';
2319
2225
  };
2320
2226
  /** 获取储存的表头列 */
2321
- var getLocalStorageHeadCom = function getLocalStorageHeadCom() {
2227
+ const getLocalStorageHeadCom = () => {
2322
2228
  if (props.rememberColumns === false) return {};
2323
- var json = getLocalStorageSelectHead(getTableHeadKey(), dayNum);
2229
+ const json = getLocalStorageSelectHead(getTableHeadKey(), dayNum);
2324
2230
  return json;
2325
2231
  };
2326
2232
  /**
2327
2233
  * 设置本地表格列
2328
2234
  *
2329
2235
  * */
2330
- var setLocalStorageHeadCom = function setLocalStorageHeadCom(obj) {
2236
+ const setLocalStorageHeadCom = obj => {
2331
2237
  if (props.rememberColumns === false) return;
2332
- var localStorageData = getLocalStorageHeadCom();
2333
- var json = {
2238
+ const localStorageData = getLocalStorageHeadCom();
2239
+ const json = {
2334
2240
  headName: localStorageData.headName || {},
2335
2241
  headDataConfig: localStorageData.headDataConfig || {},
2336
2242
  storageTime: new Date().getTime(),
@@ -2338,10 +2244,10 @@ var Table = function Table(propsInit) {
2338
2244
  };
2339
2245
  // 设置固定列
2340
2246
  if (obj.setFixed) {
2341
- var selectHeadJson = ArrayToObject('name', obj.headArr || []);
2342
- for (var i = 0, l = showHeadList.length; i < l; i++) {
2343
- var item = showHeadList[i];
2344
- var name = item.name || '';
2247
+ const selectHeadJson = ArrayToObject('name', obj.headArr || []);
2248
+ for (let i = 0, l = showHeadList.length; i < l; i++) {
2249
+ const item = showHeadList[i];
2250
+ const name = item.name || '';
2345
2251
  json.headName[name] = false;
2346
2252
  if (selectHeadJson[name]) {
2347
2253
  json.headName[name] = true;
@@ -2360,7 +2266,7 @@ var Table = function Table(propsInit) {
2360
2266
  * @param showHeadArr {HeadDataProps[]} 显示列与本地数据集合
2361
2267
  * @param localHead {HeadLocalStorageItem} 本地显示列数据
2362
2268
  * */
2363
- var handHeadShow = function handHeadShow(item, showHeadArr, localHead) {
2269
+ const handHeadShow = (item, showHeadArr, localHead) => {
2364
2270
  if (showColumns === false) {
2365
2271
  // 如果不显示选择列,全部显示
2366
2272
  showHeadArr.push(item);
@@ -2371,9 +2277,9 @@ var Table = function Table(propsInit) {
2371
2277
  if (item.selected) showHeadArr.push(item);
2372
2278
  } else {
2373
2279
  // 记住列
2374
- var nameSelectJson = localHead.headName || {};
2375
- var name = item.name || '';
2376
- var nameSelect = nameSelectJson[name];
2280
+ const nameSelectJson = localHead.headName || {};
2281
+ const name = item.name || '';
2282
+ const nameSelect = nameSelectJson[name];
2377
2283
  if (nameSelect !== undefined) {
2378
2284
  // 存在本地选择列里面,选中添加到显示列
2379
2285
  if (nameSelect) showHeadArr.push(item);
@@ -2384,8 +2290,8 @@ var Table = function Table(propsInit) {
2384
2290
  }
2385
2291
  };
2386
2292
  /** 处理序号 */
2387
- var handSerial = function handSerial(arr) {
2388
- var defaultVal = {
2293
+ const handSerial = arr => {
2294
+ const defaultVal = {
2389
2295
  label: intl({
2390
2296
  id: 'serial'
2391
2297
  }),
@@ -2397,7 +2303,7 @@ var Table = function Table(propsInit) {
2397
2303
  name: 'table-serial-number',
2398
2304
  sort: false,
2399
2305
  filter: false,
2400
- render: function render(row, item, val, index, rowIndex) {
2306
+ render: (row, item, val, index, rowIndex) => {
2401
2307
  return Number(rowIndex) + 1;
2402
2308
  }
2403
2309
  };
@@ -2414,15 +2320,15 @@ var Table = function Table(propsInit) {
2414
2320
  * @param arr {(HeadDataProps | HeadDataReqProps)[]} 表头数据
2415
2321
  * @param bol {boolean} true请求表头
2416
2322
  * */
2417
- var handInitHead = function handInitHead(arr, bol) {
2418
- var headShowArr = []; // 表格显示列
2419
- var headArr = []; // 显示列列表
2420
- var json = {};
2421
- var localHead = getLocalStorageHeadCom();
2323
+ const handInitHead = (arr, bol) => {
2324
+ const headShowArr = []; // 表格显示列
2325
+ const headArr = []; // 显示列列表
2326
+ const json = {};
2327
+ const localHead = getLocalStorageHeadCom();
2422
2328
  constData.current.headDataConfig = localHead.headDataConfig || {};
2423
- for (var i = 0, l = arr.length; i < l; i++) {
2424
- var item = arr[i];
2425
- var name = item.name || '';
2329
+ for (let i = 0, l = arr.length; i < l; i++) {
2330
+ const item = arr[i];
2331
+ const name = item.name || '';
2426
2332
  if (typeof item.width === 'number') item.width = "".concat(item.width, "px");
2427
2333
  if (!bol) item.orderNum = i;
2428
2334
  handHeadShow(item, headShowArr, localHead);
@@ -2430,10 +2336,10 @@ var Table = function Table(propsInit) {
2430
2336
  json[name] = item;
2431
2337
  }
2432
2338
  if (bol) {
2433
- headShowArr.sort(function (a, b) {
2339
+ headShowArr.sort((a, b) => {
2434
2340
  return Number(a.orderNum) - Number(b.orderNum);
2435
2341
  });
2436
- headArr.sort(function (a, b) {
2342
+ headArr.sort((a, b) => {
2437
2343
  return Number(a.orderNum) - Number(b.orderNum);
2438
2344
  });
2439
2345
  }
@@ -2445,8 +2351,8 @@ var Table = function Table(propsInit) {
2445
2351
  constData.current.headDataJson = json;
2446
2352
  };
2447
2353
  // 计算左边的差量
2448
- var handLeftWidth = function handLeftWidth() {
2449
- var leftNum = 0;
2354
+ const handLeftWidth = () => {
2355
+ let leftNum = 0;
2450
2356
  // 复选
2451
2357
  if (props.check) {
2452
2358
  leftNum += 48;
@@ -2470,8 +2376,8 @@ var Table = function Table(propsInit) {
2470
2376
  return leftNum;
2471
2377
  };
2472
2378
  // 计算右边的差量
2473
- var handRightWidth = function handRightWidth() {
2474
- var rightNum = 0;
2379
+ const handRightWidth = () => {
2380
+ let rightNum = 0;
2475
2381
  // 显示列宽度
2476
2382
  if (props.showColumns === 'inside' || props.showColumns === undefined) {
2477
2383
  rightNum += 53;
@@ -2489,42 +2395,41 @@ var Table = function Table(propsInit) {
2489
2395
  }
2490
2396
  }
2491
2397
  }
2492
-
2493
2398
  return rightNum;
2494
2399
  };
2495
2400
  // 获取宽度
2496
- var getWidth = function getWidth(item) {
2497
- var w = item.width || '';
2498
- var name = item.name || '';
2499
- var wDrag = constData.current.headDataConfig[name] && constData.current.headDataConfig[name].width;
2401
+ const getWidth = item => {
2402
+ let w = item.width || '';
2403
+ const name = item.name || '';
2404
+ const wDrag = constData.current.headDataConfig[name] && constData.current.headDataConfig[name].width;
2500
2405
  if (wDrag) w = wDrag;
2501
2406
  return w;
2502
2407
  };
2503
2408
  /**
2504
2409
  * 处理显示列宽度
2505
2410
  * */
2506
- var handHeadDataCom = function handHeadDataCom(arr) {
2411
+ const handHeadDataCom = arr => {
2507
2412
  // 左侧定位数组
2508
- var leftArr = [];
2413
+ const leftArr = [];
2509
2414
  // 右侧定位数组
2510
- var rightArr = [];
2415
+ const rightArr = [];
2511
2416
  // 表格最小宽度
2512
- var tableMinWidth = 0;
2417
+ let tableMinWidth = 0;
2513
2418
  // 左边差量
2514
- var leftWidth = handLeftWidth();
2419
+ const leftWidth = handLeftWidth();
2515
2420
  tableMinWidth += leftWidth;
2516
2421
  // 右边差量
2517
- var rightWidth = handRightWidth();
2422
+ const rightWidth = handRightWidth();
2518
2423
  tableMinWidth += rightWidth;
2519
- var posJson = {
2424
+ const posJson = {
2520
2425
  leftBol: false,
2521
2426
  rightBol: false
2522
2427
  };
2523
2428
  // 显示列
2524
- for (var i = 0, l = arr.length; i < l; i++) {
2525
- var item = arr[i];
2526
- var itemWidth = 0;
2527
- var handW = getWidth(item); // 获取宽度,有拖动过后宽度,就用拖动的
2429
+ for (let i = 0, l = arr.length; i < l; i++) {
2430
+ const item = arr[i];
2431
+ let itemWidth = 0;
2432
+ const handW = getWidth(item); // 获取宽度,有拖动过后宽度,就用拖动的
2528
2433
  if (handW) {
2529
2434
  itemWidth = getStringInNumber(handW);
2530
2435
  tableMinWidth += itemWidth;
@@ -2543,19 +2448,19 @@ var Table = function Table(propsInit) {
2543
2448
  if (leftArr.length > 0) {
2544
2449
  posJson.leftBol = true;
2545
2450
  // 左边定位位置
2546
- var leftOps = leftWidth;
2547
- for (var _i = 0, _l = leftArr.length; _i < _l; _i++) {
2548
- var _item = leftArr[_i];
2549
- if (_item.width) {
2550
- var _handW = getWidth(_item); // 获取宽度,有拖动过后宽度,就用拖动的
2551
- var _itemWidth = getStringInNumber(_handW);
2552
- _item.paraui_left_width = leftOps;
2553
- leftOps += _itemWidth;
2451
+ let leftOps = leftWidth;
2452
+ for (let i = 0, l = leftArr.length; i < l; i++) {
2453
+ const item = leftArr[i];
2454
+ if (item.width) {
2455
+ const handW = getWidth(item); // 获取宽度,有拖动过后宽度,就用拖动的
2456
+ const itemWidth = getStringInNumber(handW);
2457
+ item.paraui_left_width = leftOps;
2458
+ leftOps += itemWidth;
2554
2459
  // 最后一个
2555
- if (_i === leftArr.length - 1) {
2556
- _item.paraui_fixed_left_last = true;
2460
+ if (i === leftArr.length - 1) {
2461
+ item.paraui_fixed_left_last = true;
2557
2462
  } else {
2558
- _item.paraui_fixed_left_last = false;
2463
+ item.paraui_fixed_left_last = false;
2559
2464
  }
2560
2465
  }
2561
2466
  }
@@ -2563,19 +2468,19 @@ var Table = function Table(propsInit) {
2563
2468
  if (rightArr.length > 0) {
2564
2469
  posJson.rightBol = true;
2565
2470
  // 右边定位位置
2566
- var rightOps = rightWidth;
2567
- for (var _i2 = rightArr.length - 1; _i2 >= 0; _i2--) {
2568
- var _item2 = rightArr[_i2];
2569
- if (_item2.width) {
2570
- var _handW2 = getWidth(_item2); // 获取宽度,有拖动过后宽度,就用拖动的
2571
- var _itemWidth2 = getStringInNumber(_handW2);
2572
- _item2.paraui_right_width = rightOps;
2573
- rightOps += _itemWidth2;
2471
+ let rightOps = rightWidth;
2472
+ for (let i = rightArr.length - 1; i >= 0; i--) {
2473
+ const item = rightArr[i];
2474
+ if (item.width) {
2475
+ const handW = getWidth(item); // 获取宽度,有拖动过后宽度,就用拖动的
2476
+ const itemWidth = getStringInNumber(handW);
2477
+ item.paraui_right_width = rightOps;
2478
+ rightOps += itemWidth;
2574
2479
  // 第一个
2575
- if (_i2 === 0) {
2576
- _item2.paraui_fixed_right_first = true;
2480
+ if (i === 0) {
2481
+ item.paraui_fixed_right_first = true;
2577
2482
  } else {
2578
- _item2.paraui_fixed_right_first = false;
2483
+ item.paraui_fixed_right_first = false;
2579
2484
  }
2580
2485
  }
2581
2486
  }
@@ -2586,15 +2491,15 @@ var Table = function Table(propsInit) {
2586
2491
  /**
2587
2492
  * 处理过滤请求数据
2588
2493
  * */
2589
- var handFilterReq = function handFilterReq() {
2590
- var json = {};
2591
- var arr = Object.keys(selectFilterCom);
2592
- var headDataJson = constData.current.headDataJson || {};
2593
- for (var i = 0, l = arr.length; i < l; i++) {
2594
- var name = arr[i];
2595
- var itemValue = selectFilterCom[name];
2494
+ const handFilterReq = () => {
2495
+ const json = {};
2496
+ const arr = Object.keys(selectFilterCom);
2497
+ const headDataJson = constData.current.headDataJson || {};
2498
+ for (let i = 0, l = arr.length; i < l; i++) {
2499
+ const name = arr[i];
2500
+ const itemValue = selectFilterCom[name];
2596
2501
  if (itemValue.length === 0) continue; // 未选择的过滤项不参与请求
2597
- var item = headDataJson[name];
2502
+ const item = headDataJson[name];
2598
2503
  if (item && item.filterRadio) {
2599
2504
  json[name] = itemValue[0];
2600
2505
  } else {
@@ -2607,92 +2512,57 @@ var Table = function Table(propsInit) {
2607
2512
  * 发送请求
2608
2513
  * @param obj {ReqProps} 请求信息
2609
2514
  */
2610
- var requestData = function requestData(obj) {
2611
- return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
2612
- var _yield$requestFunc, data, err, onErrorFlag;
2613
- return regenerator.wrap(function _callee$(_context) {
2614
- while (1) switch (_context.prev = _context.next) {
2615
- case 0:
2616
- obj.uuid = reqId;
2617
- if (props.loading === undefined) setLoadState(true);
2618
- _context.next = 4;
2619
- return requestFunc(obj);
2620
- case 4:
2621
- _yield$requestFunc = _context.sent;
2622
- data = _yield$requestFunc.data;
2623
- err = _yield$requestFunc.err;
2624
- if (!constData.current.isDestroy) {
2625
- _context.next = 9;
2626
- break;
2627
- }
2628
- return _context.abrupt("return");
2629
- case 9:
2630
- if (!err) {
2631
- _context.next = 23;
2632
- break;
2633
- }
2634
- if (props.loading === undefined) setLoadState(false);
2635
- // cancel的接口 不清除上次展示的数据
2636
- if (err.__CANCEL__) {
2637
- _context.next = 22;
2638
- break;
2639
- }
2640
- onErrorFlag = false;
2641
- if (!constData.current.onError) {
2642
- _context.next = 17;
2643
- break;
2644
- }
2645
- _context.next = 16;
2646
- return constData.current.onError(err);
2647
- case 16:
2648
- onErrorFlag = _context.sent;
2649
- case 17:
2650
- if (onErrorFlag) {
2651
- _context.next = 19;
2652
- break;
2653
- }
2654
- return _context.abrupt("return");
2655
- case 19:
2656
- setRowData([]);
2657
- setTotal(0);
2658
- setRowDataJson({});
2659
- case 22:
2660
- return _context.abrupt("return", false);
2661
- case 23:
2662
- if (requestCallback) {
2663
- requestCallback(data, function (handData) {
2664
- if (handData) {
2665
- if (handData.data) handData = handData.data;
2666
- handReqData(handData);
2667
- if (props.loading === undefined) setLoadState(false);
2668
- }
2669
- });
2670
- } else {
2671
- if (data.data) data = data.data;
2672
- handReqData(data);
2673
- if (props.loading === undefined) setLoadState(false);
2674
- }
2675
- case 24:
2676
- case "end":
2677
- return _context.stop();
2515
+ const requestData = obj => __awaiter(void 0, void 0, void 0, function* () {
2516
+ obj.uuid = reqId;
2517
+ if (props.loading === undefined) setLoadState(true);
2518
+ let {
2519
+ data,
2520
+ err
2521
+ } = yield requestFunc(obj);
2522
+ if (constData.current.isDestroy) return;
2523
+ if (err) {
2524
+ if (props.loading === undefined) setLoadState(false);
2525
+ // cancel的接口 不清除上次展示的数据
2526
+ if (!err.__CANCEL__) {
2527
+ let onErrorFlag = false;
2528
+ if (constData.current.onError) {
2529
+ onErrorFlag = yield constData.current.onError(err);
2678
2530
  }
2679
- }, _callee);
2680
- }));
2681
- };
2531
+ if (!onErrorFlag) return;
2532
+ setRowData([]);
2533
+ setTotal(0);
2534
+ setRowDataJson({});
2535
+ }
2536
+ return false;
2537
+ }
2538
+ if (requestCallback) {
2539
+ requestCallback(data, handData => {
2540
+ if (handData) {
2541
+ if (handData.data) handData = handData.data;
2542
+ handReqData(handData);
2543
+ if (props.loading === undefined) setLoadState(false);
2544
+ }
2545
+ });
2546
+ } else {
2547
+ if (data.data) data = data.data;
2548
+ handReqData(data);
2549
+ if (props.loading === undefined) setLoadState(false);
2550
+ }
2551
+ });
2682
2552
  /**
2683
2553
  * 设置请求数据
2684
2554
  * @param data {any} 请求信息
2685
2555
  */
2686
- var handReqData = function handReqData(data) {
2556
+ const handReqData = data => {
2687
2557
  if (data.columns && props.headData === undefined) {
2688
- var str = JSON.stringify(data.columns);
2558
+ const str = JSON.stringify(data.columns);
2689
2559
  if (str !== JSON.stringify(originalHead)) {
2690
2560
  setOriginalHead(data.columns);
2691
- var arr = Object.keys(data.columns);
2692
- var headDataArr = []; // 表头数据
2693
- for (var i = 0, l = arr.length; i < l; i++) {
2694
- var key = arr[i];
2695
- var item = data.columns[key];
2561
+ const arr = Object.keys(data.columns);
2562
+ const headDataArr = []; // 表头数据
2563
+ for (let i = 0, l = arr.length; i < l; i++) {
2564
+ const key = arr[i];
2565
+ const item = data.columns[key];
2696
2566
  item.name = key;
2697
2567
  item.label = item.displayName;
2698
2568
  item.filter = item.filterFlag;
@@ -2714,7 +2584,7 @@ var Table = function Table(propsInit) {
2714
2584
  setPageCom(Number(data.page));
2715
2585
  }
2716
2586
  } else {
2717
- var handData1 = [];
2587
+ let handData1 = [];
2718
2588
  if (data instanceof Array) {
2719
2589
  handData1 = data;
2720
2590
  } else {
@@ -2727,15 +2597,15 @@ var Table = function Table(propsInit) {
2727
2597
  * 设置当前页数据
2728
2598
  * @param nowPageData {any} 当前页数据
2729
2599
  */
2730
- var setNowPageData = function setNowPageData(nowPageData) {
2600
+ const setNowPageData = nowPageData => {
2731
2601
  // 加载更多请求放在里面
2732
2602
  if (constData.current.loadMoreUrl) {
2733
- var historyData = constData.current.historyData || [];
2603
+ const historyData = constData.current.historyData || [];
2734
2604
  if (historyData.length > 0) {
2735
- nowPageData = [].concat(_toConsumableArray(historyData), _toConsumableArray(nowPageData));
2605
+ nowPageData = [...historyData, ...nowPageData];
2736
2606
  }
2737
2607
  }
2738
- var handDataJson = ArrayToObject(rowKey, nowPageData);
2608
+ const handDataJson = ArrayToObject(rowKey, nowPageData);
2739
2609
  constData.current.historyData = nowPageData;
2740
2610
  setRowDataJson(handDataJson);
2741
2611
  setRowData(nowPageData);
@@ -2748,7 +2618,7 @@ var Table = function Table(propsInit) {
2748
2618
  * 改变页数
2749
2619
  * @param num {number | undefined} 页数
2750
2620
  */
2751
- var changePage = function changePage(num) {
2621
+ const changePage = num => {
2752
2622
  if (num !== undefined) handPage(num);
2753
2623
  clearCheckValue();
2754
2624
  };
@@ -2756,7 +2626,7 @@ var Table = function Table(propsInit) {
2756
2626
  * 改变每页条数
2757
2627
  * @param num {number | undefined} 条数
2758
2628
  */
2759
- var changeRowsPerPage = function changeRowsPerPage(num) {
2629
+ const changeRowsPerPage = num => {
2760
2630
  if (num !== undefined) handSize(num);
2761
2631
  handPage(1);
2762
2632
  clearCheckValue();
@@ -2764,8 +2634,8 @@ var Table = function Table(propsInit) {
2764
2634
  /**
2765
2635
  * 加载更多,点击改变分页
2766
2636
  */
2767
- var changePageMore = function changePageMore() {
2768
- var pageHnad = Number(pageCom) + 1;
2637
+ const changePageMore = () => {
2638
+ const pageHnad = Number(pageCom) + 1;
2769
2639
  handPage(pageHnad);
2770
2640
  };
2771
2641
  /**
@@ -2773,12 +2643,12 @@ var Table = function Table(propsInit) {
2773
2643
  * @param event 元素
2774
2644
  * @param name 当前列name
2775
2645
  */
2776
- var handleRequestSort = function handleRequestSort(event, name) {
2646
+ const handleRequestSort = (event, name) => {
2777
2647
  // asc 升序 -> desc降序 -> undefined 无序
2778
- var index = orderFieldArr.indexOf(name);
2648
+ const index = orderFieldArr.indexOf(name);
2779
2649
  if (index !== -1) {
2780
2650
  // 排序过
2781
- var orderType = orderTypeArr[index];
2651
+ const orderType = orderTypeArr[index];
2782
2652
  if (orderType === 'asc') {
2783
2653
  orderTypeArr[index] = 'desc';
2784
2654
  }
@@ -2794,11 +2664,11 @@ var Table = function Table(propsInit) {
2794
2664
  orderFieldArr.push(name);
2795
2665
  orderTypeArr.push('asc');
2796
2666
  }
2797
- var orderFieldArrHand = _toConsumableArray(orderFieldArr);
2798
- var orderTypeArrHand = _toConsumableArray(orderTypeArr);
2667
+ let orderFieldArrHand = [...orderFieldArr];
2668
+ let orderTypeArrHand = [...orderTypeArr];
2799
2669
  // 单个排序
2800
2670
  if (sortTableRadio) {
2801
- var num = orderFieldArrHand.indexOf(name);
2671
+ const num = orderFieldArrHand.indexOf(name);
2802
2672
  if (num !== -1) {
2803
2673
  orderFieldArrHand = [orderFieldArrHand[num]];
2804
2674
  orderTypeArrHand = [orderTypeArrHand[num]];
@@ -2823,12 +2693,12 @@ var Table = function Table(propsInit) {
2823
2693
  * 处理复选框往外抛值
2824
2694
  * @param json 当前选中值
2825
2695
  */
2826
- var handCheckValue = function handCheckValue(json) {
2696
+ const handCheckValue = json => {
2827
2697
  if (props.checkDefaultValue === undefined) setCheckJson(Object.assign({}, json));
2828
- var arr = Object.keys(json);
2698
+ const arr = Object.keys(json);
2829
2699
  if (setCheck) {
2830
- var selectData = [];
2831
- for (var i = 0, l = arr.length; i < l; i++) {
2700
+ const selectData = [];
2701
+ for (let i = 0, l = arr.length; i < l; i++) {
2832
2702
  if (totalDataJson[arr[i]]) selectData.push(totalDataJson[arr[i]]);
2833
2703
  }
2834
2704
  setCheck(arr, selectData);
@@ -2839,12 +2709,12 @@ var Table = function Table(propsInit) {
2839
2709
  * @param event 选择的元素
2840
2710
  * @param bol 全选 / 全不选
2841
2711
  */
2842
- var setAllCheck = function setAllCheck(event, bol) {
2712
+ const setAllCheck = (event, bol) => {
2843
2713
  // 存在checkDefaultValue, {...checkJson}解决直接使用checkJson, 复选框会一闪
2844
2714
  // 不存在checkDefaultValue,内部直接记录状态
2845
- var checkJsonDeep = props.checkDefaultValue !== undefined ? Object.assign({}, checkJson) : checkJson;
2846
- for (var i = 0, l = rowData.length; i < l; i++) {
2847
- var key = rowData[i][rowKey];
2715
+ const checkJsonDeep = props.checkDefaultValue !== undefined ? Object.assign({}, checkJson) : checkJson;
2716
+ for (let i = 0, l = rowData.length; i < l; i++) {
2717
+ const key = rowData[i][rowKey];
2848
2718
  if (!disabledJson[key]) {
2849
2719
  if (bol) {
2850
2720
  checkJsonDeep[key] = true;
@@ -2861,10 +2731,10 @@ var Table = function Table(propsInit) {
2861
2731
  * @param bol 选 / 不选
2862
2732
  * @param key 当前行key
2863
2733
  */
2864
- var selectCheck = function selectCheck(event, bol, key) {
2734
+ const selectCheck = (event, bol, key) => {
2865
2735
  // 存在checkDefaultValue, {...checkJson}解决直接使用checkJson, 复选框会一闪
2866
2736
  // 不存在checkDefaultValue,内部直接记录状态
2867
- var checkJsonDeep = props.checkDefaultValue !== undefined ? Object.assign({}, checkJson) : checkJson;
2737
+ const checkJsonDeep = props.checkDefaultValue !== undefined ? Object.assign({}, checkJson) : checkJson;
2868
2738
  checkJsonDeep[key] = bol;
2869
2739
  if (checkJsonDeep[key] === false) delete checkJsonDeep[key]; // 确保json里面的数据都是选中的
2870
2740
  handCheckValue(checkJsonDeep);
@@ -2874,13 +2744,13 @@ var Table = function Table(propsInit) {
2874
2744
  * @param event 选择的元素
2875
2745
  * @param item 当前行数据
2876
2746
  */
2877
- var selectRadio = function selectRadio(event, val) {
2747
+ const selectRadio = (event, val) => {
2878
2748
  if (setRadio) setRadio(val, totalDataJson[val]);
2879
2749
  };
2880
2750
  /**
2881
2751
  * 清空复选框选中值
2882
2752
  */
2883
- var clearCheckValue = function clearCheckValue() {
2753
+ const clearCheckValue = () => {
2884
2754
  if (!checkRememberPage) {
2885
2755
  setCheckJson({});
2886
2756
  handCheckValue({});
@@ -2892,10 +2762,10 @@ var Table = function Table(propsInit) {
2892
2762
  * @param item 当前点击项
2893
2763
  * @param isRest 是否重置
2894
2764
  * */
2895
- var changeSelectHead = function changeSelectHead(arr, item, isRest) {
2765
+ const changeSelectHead = (arr, item, isRest) => {
2896
2766
  handHeadDataCom(arr);
2897
2767
  setHeadDataCom(arr);
2898
- var obj = {
2768
+ const obj = {
2899
2769
  setFixed: true,
2900
2770
  headArr: arr
2901
2771
  };
@@ -2913,45 +2783,45 @@ var Table = function Table(propsInit) {
2913
2783
  * @param bol 重置
2914
2784
  * @param item 当前点击项
2915
2785
  */
2916
- var changeShowList = function changeShowList(headShowArr, bol, item) {
2786
+ const changeShowList = (headShowArr, bol, item) => {
2917
2787
  if (bol) {
2918
2788
  constData.current.headDataConfig = {};
2919
2789
  setHeadDataConfig({}); // 重置拖拽列
2920
- var arr = [];
2921
- var arrShow = _toConsumableArray(showHeadList);
2790
+ const arr = [];
2791
+ const arrShow = [...showHeadList];
2922
2792
  handSerial(arrShow);
2923
- for (var i = 0, l = arrShow.length; i < l; i++) {
2924
- var _item3 = arrShow[i];
2925
- if (_item3 && _item3.selected) {
2793
+ for (let i = 0, l = arrShow.length; i < l; i++) {
2794
+ const item = arrShow[i];
2795
+ if (item && item.selected) {
2926
2796
  // 当前显示字段
2927
- arr.push(_item3);
2797
+ arr.push(item);
2928
2798
  }
2929
2799
  }
2930
2800
  changeSelectHead(arr, item, true);
2931
2801
  return;
2932
2802
  }
2933
- headShowArr.sort(function (a, b) {
2803
+ headShowArr.sort((a, b) => {
2934
2804
  return Number(a.orderNum) - Number(b.orderNum);
2935
2805
  });
2936
- var headShowArrHand = _toConsumableArray(headShowArr);
2806
+ const headShowArrHand = [...headShowArr];
2937
2807
  changeSelectHead(headShowArrHand, item);
2938
2808
  };
2939
2809
  /**
2940
2810
  * 改变过滤
2941
2811
  */
2942
- var changeFilter = function changeFilter(val) {
2812
+ const changeFilter = val => {
2943
2813
  constData.current.selectFilterCom = DeepClone(val);
2944
2814
  setSelectFilterCom(DeepClone(val));
2945
2815
  handPage(1);
2946
2816
  };
2947
2817
  /** 改变拖拽列width */
2948
- var changeColumnWidth = function changeColumnWidth(headCell, result) {
2949
- var name = headCell.name || '';
2818
+ const changeColumnWidth = (headCell, result) => {
2819
+ const name = headCell.name || '';
2950
2820
  constData.current.headDataConfig[name] = {
2951
2821
  width: result.width
2952
2822
  };
2953
2823
  setHeadDataConfig(Object.assign({}, constData.current.headDataConfig)); // 设置表格列配置,被拖动的width
2954
- handHeadDataCom(_toConsumableArray(headData)); // 重新计算表格的最小宽度
2824
+ handHeadDataCom([...headData]); // 重新计算表格的最小宽度
2955
2825
  // 本地记住拖动列宽度
2956
2826
  setLocalStorageHeadCom({
2957
2827
  headDataConfig: constData.current.headDataConfig,
@@ -2959,7 +2829,7 @@ var Table = function Table(propsInit) {
2959
2829
  });
2960
2830
  };
2961
2831
  // 表格头部memo
2962
- var TableHeadMemo = useMemo(function () {
2832
+ const TableHeadMemo = useMemo(() => {
2963
2833
  return jsx(TableHead$1, {
2964
2834
  orderTypeArr: orderTypeArr,
2965
2835
  orderFieldArr: orderFieldArr,
@@ -2993,7 +2863,7 @@ var Table = function Table(propsInit) {
2993
2863
  });
2994
2864
  }, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn, lineWidth, dragColumn, headDataConfig, getPopupContainer, onSort, tipMaxWidth]);
2995
2865
  // 表格内容memo
2996
- var TableBodyMemo = useMemo(function () {
2866
+ const TableBodyMemo = useMemo(() => {
2997
2867
  return jsx(TableBody, {
2998
2868
  url: url,
2999
2869
  emptyProps: emptyProps,
@@ -3031,9 +2901,7 @@ var Table = function Table(propsInit) {
3031
2901
  disabledExpand: disabledExpand,
3032
2902
  onExpand: onExpand,
3033
2903
  defaultExpandAllRows: defaultExpandAllRows,
3034
- onRefresh: function onRefresh() {
3035
- return setRefreshCom(Math.random());
3036
- },
2904
+ onRefresh: () => setRefreshCom(Math.random()),
3037
2905
  posFixed: posFixed,
3038
2906
  beyondText: beyondText,
3039
2907
  fixedColumn: fixedColumn,
@@ -3045,7 +2913,7 @@ var Table = function Table(propsInit) {
3045
2913
  });
3046
2914
  }, [showColumns, formatter, rowKey, rowData, headDataCom, expandable, check, radio, checkJson, sortTable, orderTypeArr, orderFieldArr, radioValue, disabledJson, align, tableCell, operate, setRadio, setCheck, totalDataJson, loadMore, loadMoreRender, onClickMore, total, pageCom, sizeCom, loadMoreUrl, expandValue, expandMultiple, disabledExpand, onExpand, defaultExpandAllRows, loadState, emptyProps, url, disabledArrStatus, posFixed, beyondText, fixedTable, fixedColumn, onClickRow, rowClassMapping, tipMaxWidth, lineHeight]);
3047
2915
  // 表格分页memo
3048
- var TablePaginationMemo = useMemo(function () {
2916
+ const TablePaginationMemo = useMemo(() => {
3049
2917
  if (constData.current.page === null || constData.current.size === null || loadMore) return;
3050
2918
  return pagination && jsx(TableHead, {
3051
2919
  paginationType: paginationType,
@@ -3059,9 +2927,7 @@ var Table = function Table(propsInit) {
3059
2927
  changeRowsPerPage: changeRowsPerPage,
3060
2928
  refreshInside: refreshInside,
3061
2929
  checkCount: checkCount,
3062
- onRefresh: function onRefresh() {
3063
- return setRefreshCom(Math.random());
3064
- },
2930
+ onRefresh: () => setRefreshCom(Math.random()),
3065
2931
  selectStatus: headSelectStatus,
3066
2932
  selectAll: setAllCheck,
3067
2933
  checkNumber: Object.keys(checkJson).length,
@@ -3069,9 +2935,9 @@ var Table = function Table(propsInit) {
3069
2935
  });
3070
2936
  }, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType, flippingArrow, refreshInside, checkCount, headSelectStatus, rowData, checkJson, disabledJson, totalDataJson, rowData]);
3071
2937
  // 表格内容滚动
3072
- var tableBoxScroll = function tableBoxScroll(e) {
3073
- var dom = tableRef.current;
3074
- var scrollDom = e.target;
2938
+ const tableBoxScroll = e => {
2939
+ const dom = tableRef.current;
2940
+ const scrollDom = e.target;
3075
2941
  if (!dom || !scrollDom) return;
3076
2942
  dom.classList.remove('table-scroll-left', 'table-scroll-right', 'table-scroll-middle');
3077
2943
  if (scrollDom.scrollWidth <= scrollDom.clientWidth) return;
@@ -3088,8 +2954,8 @@ var Table = function Table(propsInit) {
3088
2954
  dom.classList.add('table-scroll-middle');
3089
2955
  };
3090
2956
  // 处理class
3091
- var handClass = function handClass() {
3092
- var str = "".concat($prefixCls, "-table");
2957
+ const handClass = () => {
2958
+ let str = "".concat($prefixCls, "-table");
3093
2959
  if (showColumns === 'inside') str += " ".concat($prefixCls, "-table-columns-inside");
3094
2960
  if (pagination) str += " ".concat($prefixCls, "-table-pagination");
3095
2961
  if (loadMore) str += " ".concat($prefixCls, "-table-load-more");
@@ -3105,7 +2971,7 @@ var Table = function Table(propsInit) {
3105
2971
  return str;
3106
2972
  };
3107
2973
  // 改变屏幕大小
3108
- var changeResize = function changeResize() {
2974
+ const changeResize = () => {
3109
2975
  tableBoxScroll({
3110
2976
  target: containerRef.current
3111
2977
  });