@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.
- package/AutoBox/index.js +72 -85
- package/AutoTips/index.js +72 -95
- package/Badge/index.js +17 -16
- package/Breadcrumbs/index.js +57 -73
- package/Button/index.js +90 -118
- package/ButtonGroup/index.js +30 -33
- package/Carousel/index.js +29 -33
- package/Cascader/index.js +9 -10
- package/Checkbox/index.js +28 -35
- package/CheckboxGroup/index.js +43 -58
- package/Collapse/index.js +52 -49
- package/CollapseBox/index.js +65 -70
- package/CollapseLayout/index.js +106 -101
- package/ColorPicker/index.js +3 -3
- package/ComboSelect/index.js +260 -337
- package/ComboSelect/lang/en_US.d.ts +1 -0
- package/ComboSelect/lang/index.d.ts +2 -0
- package/ComboSelect/lang/zh_CN.d.ts +1 -0
- package/ComboSelect/utils.d.ts +6 -0
- package/Container/index.js +17 -21
- package/CopyText/index.js +50 -83
- package/DatePicker/index.js +24 -27
- package/Descriptions/index.js +50 -59
- package/Desktop/index.js +161 -180
- package/DragVerify/index.js +77 -113
- package/Drawer/index.js +80 -95
- package/Dropdown/index.js +3 -3
- package/DynamicMultiBox/index.js +222 -224
- package/DynamicMultiBox/interface.d.ts +7 -0
- package/Empty/index.js +26 -28
- package/Form/index.js +70 -74
- package/FormItem/index.js +18 -15
- package/FunctionModal/index.js +7 -14
- package/GlobalContext/index.js +17 -20
- package/Help/index.js +9 -12
- package/HelperText/index.js +11 -11
- package/InputLang/index.js +104 -124
- package/InputNumber/index.js +62 -81
- package/Label/index.js +19 -21
- package/Loading/index.js +11 -10
- package/Menu/index.js +302 -371
- package/Message/index.js +104 -113
- package/Modal/index.js +122 -148
- package/MultiBox/index.d.ts +5 -0
- package/MultiBox/index.js +111 -115
- package/Notification/index.js +105 -103
- package/OperateBtn/index.d.ts +3 -0
- package/OperateBtn/index.js +77 -107
- package/PageHeader/index.js +327 -406
- package/Pagination/index.js +107 -137
- package/ParauiProvider/index.js +20 -22
- package/PasswordRules/index.js +36 -40
- package/PopConfirm/index.js +60 -77
- package/Popover/index.js +12 -12
- package/Progress/index.js +72 -74
- package/Querying/index.js +22 -23
- package/README.md +2 -0
- package/Radio/index.js +27 -34
- package/RadioGroup/index.js +38 -52
- package/Search/index.js +34 -43
- package/Select/index.js +281 -345
- package/SelectInput/index.js +8 -13
- package/Selector/index.js +582 -796
- package/SelectorPicker/index.js +113 -134
- package/SingleBox/index.d.ts +5 -0
- package/SingleBox/index.js +92 -88
- package/Slider/index.js +46 -57
- package/Status/index.js +14 -13
- package/Stepper/index.js +24 -25
- package/Styles/theme.scss +9 -9
- package/Switch/index.js +32 -35
- package/Table/index.js +360 -494
- package/Tabs/index.js +100 -100
- package/Tag/index.js +64 -82
- package/TextEditor/index.js +78 -100
- package/TextField/index.js +142 -183
- package/TimePicker/index.js +29 -28
- package/Timeline/index.js +50 -47
- package/Title/index.js +32 -34
- package/ToggleButton/index.js +29 -29
- package/Tooltip/index.js +52 -56
- package/Transfer/index.js +117 -154
- package/Tree/index.js +9 -10
- package/Upload/index.js +125 -143
- package/Upload/interface.d.ts +2 -0
- package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
- package/_verture/{index-5a7e2438.js → index-3cdaba96.js} +967 -934
- package/_verture/{index-b1f80962.js → index-4fafd0a0.js} +6 -8
- package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
- package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
- package/_verture/{index-232d890b.js → index-d63bd287.js} +1 -1
- package/_verture/index-da9097d3.js +239 -0
- package/_verture/{index-9331b116.js → index-e0f9064d.js} +125 -134
- package/_verture/intl-f2f27722.js +69 -0
- package/_verture/{modalContext-736ff215.js → modalContext-8534f23d.js} +36 -64
- package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
- package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
- package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
- package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
- package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
- package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
- package/_verture/utils-c17b5265.js +97 -0
- package/index.js +24 -23
- package/locale/en-US.d.ts +1 -0
- package/locale/index.d.ts +2 -0
- package/locale/index.js +10 -8
- package/locale/zh-CN.d.ts +1 -0
- package/package.json +11 -10
- package/umd/AutoBox.js +9 -8
- package/umd/AutoTips.js +9 -8
- package/umd/Badge.js +1 -1
- package/umd/Breadcrumbs.js +9 -8
- package/umd/Button.js +9 -8
- package/umd/ButtonGroup.js +9 -8
- package/umd/Carousel.js +5 -5
- package/umd/Cascader.js +9 -8
- package/umd/Checkbox.js +9 -8
- package/umd/CheckboxGroup.js +9 -8
- package/umd/Collapse.js +8 -7
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +9 -8
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +9 -8
- package/umd/DatePicker.js +9 -8
- package/umd/Descriptions.js +9 -8
- package/umd/Desktop.js +9 -8
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +9 -8
- package/umd/Dropdown.js +6 -5
- package/umd/DynamicMultiBox.js +11 -10
- package/umd/Empty.js +1 -1
- package/umd/Form.js +9 -8
- package/umd/FormItem.js +9 -8
- package/umd/FunctionModal.js +9 -8
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +9 -8
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +9 -8
- package/umd/InputNumber.js +9 -8
- package/umd/Label.js +9 -8
- package/umd/Loading.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Message.js +4 -4
- package/umd/Modal.js +9 -8
- package/umd/MultiBox.js +9 -8
- package/umd/Notification.js +8 -7
- package/umd/OperateBtn.js +9 -8
- package/umd/PageHeader.js +9 -8
- package/umd/Pagination.js +9 -8
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +9 -8
- package/umd/Popover.js +9 -8
- package/umd/Progress.js +5 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +9 -8
- package/umd/RadioGroup.js +9 -8
- package/umd/Search.js +9 -8
- package/umd/Select.js +9 -8
- package/umd/SelectInput.js +9 -8
- package/umd/Selector.js +9 -8
- package/umd/SelectorPicker.js +9 -8
- package/umd/SingleBox.js +9 -8
- package/umd/Slider.js +6 -5
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +9 -8
- package/umd/Switch.js +9 -8
- package/umd/Table.js +9 -8
- package/umd/Tabs.js +9 -8
- package/umd/Tag.js +9 -8
- package/umd/TextEditor.js +22 -21
- package/umd/TextField.js +9 -8
- package/umd/TimePicker.js +9 -8
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +9 -8
- package/umd/ToggleButton.js +9 -8
- package/umd/Tooltip.js +9 -8
- package/umd/Transfer.js +10 -9
- package/umd/Tree.js +9 -8
- package/umd/Upload.js +10 -9
- package/umd/locale.js +1 -1
- package/_verture/index-e9007d6a.js +0 -236
- package/_verture/intl-5c1ec055.js +0 -81
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
- package/_verture/utils-418da0a4.js +0 -73
- /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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
1778
|
-
|
|
1777
|
+
const Table = propsInit => {
|
|
1778
|
+
const props = useGlobalProps(propsInit, 'Table');
|
|
1779
1779
|
// 判断浏览器
|
|
1780
|
-
|
|
1780
|
+
const Browser = GetBrowserClass();
|
|
1781
1781
|
if (Browser === 'ie') {
|
|
1782
1782
|
// IE浏览器没有固定列
|
|
1783
1783
|
props.fixedColumn = false;
|
|
1784
1784
|
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
method =
|
|
1792
|
-
data
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
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(
|
|
1896
|
+
useEffect(() => {
|
|
1994
1897
|
window.addEventListener('resize', changeResize);
|
|
1995
|
-
return
|
|
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(
|
|
1906
|
+
useEffect(() => {
|
|
2004
1907
|
if (loading !== undefined) {
|
|
2005
1908
|
clearTimeout(constData.current.loadingTimer);
|
|
2006
|
-
constData.current.loadingTimer = setTimeout(
|
|
1909
|
+
constData.current.loadingTimer = setTimeout(() => {
|
|
2007
1910
|
setLoadState(loading);
|
|
2008
1911
|
}, 50);
|
|
2009
1912
|
}
|
|
2010
1913
|
}, [loading]);
|
|
2011
|
-
useEffect(
|
|
1914
|
+
useEffect(() => {
|
|
2012
1915
|
setLoadMoreUrl(Boolean(loadMore && url));
|
|
2013
1916
|
}, [loadMore, url]);
|
|
2014
1917
|
// 监听page
|
|
2015
|
-
useEffect(
|
|
1918
|
+
useEffect(() => {
|
|
2016
1919
|
if (props.page !== undefined) {
|
|
2017
1920
|
handPage(props.page);
|
|
2018
1921
|
}
|
|
2019
1922
|
}, [page]);
|
|
2020
1923
|
// 自动计算表格一页展示条数
|
|
2021
|
-
useEffect(
|
|
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
|
-
|
|
1930
|
+
let height = containerRef.current.clientHeight - 48;
|
|
2028
1931
|
if (props.loadMore) height -= lineHeight;
|
|
2029
|
-
|
|
2030
|
-
|
|
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(
|
|
1940
|
+
sizeArr.sort((a, b) => {
|
|
2035
1941
|
return a - b;
|
|
2036
1942
|
});
|
|
2037
|
-
setSizeArrCom(
|
|
1943
|
+
setSizeArrCom([...sizeArr]);
|
|
2038
1944
|
}
|
|
2039
1945
|
handSize(columnsNUmber);
|
|
2040
1946
|
}
|
|
2041
1947
|
}
|
|
2042
1948
|
}, [size, autoSize]);
|
|
2043
1949
|
// 处理表格头部
|
|
2044
|
-
useEffect(
|
|
1950
|
+
useEffect(() => {
|
|
2045
1951
|
if (props.headData !== undefined) {
|
|
2046
1952
|
handInitHead(headData, false);
|
|
2047
1953
|
}
|
|
2048
1954
|
}, [headData]);
|
|
2049
1955
|
// 设置总数对象
|
|
2050
|
-
useEffect(
|
|
1956
|
+
useEffect(() => {
|
|
2051
1957
|
if (data) {
|
|
2052
1958
|
constData.current.historyData = [];
|
|
2053
|
-
|
|
2054
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
1980
|
+
useEffect(() => {
|
|
2075
1981
|
clearTimeout(constData.current.reqTimer);
|
|
2076
1982
|
if (constData.current.url) Cancel(reqId);
|
|
2077
|
-
constData.current.reqTimer = setTimeout(
|
|
1983
|
+
constData.current.reqTimer = setTimeout(() => {
|
|
2078
1984
|
constData.current.initReq = true;
|
|
2079
1985
|
if (constData.current.url) {
|
|
2080
1986
|
// 提交参数
|
|
2081
|
-
|
|
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
|
-
|
|
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 (
|
|
2007
|
+
if (typeof constData.current.search === 'object') {
|
|
2102
2008
|
postBody = Object.assign(Object.assign({}, postBody), constData.current.search);
|
|
2103
2009
|
}
|
|
2104
2010
|
}
|
|
2105
|
-
|
|
2011
|
+
const obj = {
|
|
2106
2012
|
url: constData.current.url,
|
|
2107
|
-
ctx
|
|
2108
|
-
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,
|
|
2115
|
-
|
|
2020
|
+
paramsCallback(obj, handObj => {
|
|
2021
|
+
const handUrl = handGetReqParams(handObj);
|
|
2116
2022
|
requestData(Object.assign(Object.assign({}, handObj), {
|
|
2117
2023
|
url: handUrl,
|
|
2118
|
-
ctx
|
|
2119
|
-
method
|
|
2024
|
+
ctx,
|
|
2025
|
+
method
|
|
2120
2026
|
}));
|
|
2121
2027
|
});
|
|
2122
2028
|
} else {
|
|
2123
|
-
|
|
2029
|
+
const handUrl = handGetReqParams(obj);
|
|
2124
2030
|
requestData({
|
|
2125
2031
|
url: handUrl,
|
|
2126
|
-
ctx
|
|
2127
|
-
method
|
|
2032
|
+
ctx,
|
|
2033
|
+
method
|
|
2128
2034
|
});
|
|
2129
2035
|
}
|
|
2130
2036
|
}
|
|
2131
2037
|
// post 请求
|
|
2132
2038
|
if (method === 'Post') {
|
|
2133
|
-
if (paramsCallback) paramsCallback(obj,
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
2062
|
+
useEffect(() => {
|
|
2157
2063
|
if (radioDefaultValue !== undefined && radioDefaultValue !== radioValue) {
|
|
2158
2064
|
setRadioValue(radioDefaultValue);
|
|
2159
2065
|
}
|
|
2160
2066
|
}, [radioDefaultValue]);
|
|
2161
2067
|
// 复选框赋默认值
|
|
2162
|
-
useEffect(
|
|
2068
|
+
useEffect(() => {
|
|
2163
2069
|
if (checkDefaultValue) {
|
|
2164
|
-
|
|
2165
|
-
for (
|
|
2166
|
-
|
|
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(
|
|
2079
|
+
useEffect(() => {
|
|
2174
2080
|
if (disabledArr) {
|
|
2175
|
-
|
|
2176
|
-
for (
|
|
2177
|
-
|
|
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(
|
|
2090
|
+
useEffect(() => {
|
|
2185
2091
|
if (Object.keys(checkJson).length === 0) {
|
|
2186
2092
|
// 全不选
|
|
2187
2093
|
setHeadSelectStatus('not');
|
|
2188
2094
|
} else {
|
|
2189
|
-
|
|
2095
|
+
const arr = Object.keys(rowDataJson);
|
|
2190
2096
|
if (arr.length === 0) {
|
|
2191
2097
|
return setHeadSelectStatus('not');
|
|
2192
2098
|
}
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
for (
|
|
2196
|
-
|
|
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(
|
|
2126
|
+
useEffect(() => {
|
|
2221
2127
|
tableBoxScroll({
|
|
2222
2128
|
target: containerRef.current
|
|
2223
2129
|
});
|
|
2224
2130
|
});
|
|
2225
2131
|
/** 设置size */
|
|
2226
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2146
|
+
const handLocalData = () => {
|
|
2241
2147
|
var _a;
|
|
2242
|
-
|
|
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
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
for (
|
|
2255
|
-
|
|
2256
|
-
|
|
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 (
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
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
|
-
|
|
2286
|
-
|
|
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 (
|
|
2292
|
-
|
|
2293
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2227
|
+
const getLocalStorageHeadCom = () => {
|
|
2322
2228
|
if (props.rememberColumns === false) return {};
|
|
2323
|
-
|
|
2229
|
+
const json = getLocalStorageSelectHead(getTableHeadKey(), dayNum);
|
|
2324
2230
|
return json;
|
|
2325
2231
|
};
|
|
2326
2232
|
/**
|
|
2327
2233
|
* 设置本地表格列
|
|
2328
2234
|
*
|
|
2329
2235
|
* */
|
|
2330
|
-
|
|
2236
|
+
const setLocalStorageHeadCom = obj => {
|
|
2331
2237
|
if (props.rememberColumns === false) return;
|
|
2332
|
-
|
|
2333
|
-
|
|
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
|
-
|
|
2342
|
-
for (
|
|
2343
|
-
|
|
2344
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
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
|
-
|
|
2388
|
-
|
|
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:
|
|
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
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
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 (
|
|
2424
|
-
|
|
2425
|
-
|
|
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(
|
|
2339
|
+
headShowArr.sort((a, b) => {
|
|
2434
2340
|
return Number(a.orderNum) - Number(b.orderNum);
|
|
2435
2341
|
});
|
|
2436
|
-
headArr.sort(
|
|
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
|
-
|
|
2449
|
-
|
|
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
|
-
|
|
2474
|
-
|
|
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
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
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
|
-
|
|
2411
|
+
const handHeadDataCom = arr => {
|
|
2507
2412
|
// 左侧定位数组
|
|
2508
|
-
|
|
2413
|
+
const leftArr = [];
|
|
2509
2414
|
// 右侧定位数组
|
|
2510
|
-
|
|
2415
|
+
const rightArr = [];
|
|
2511
2416
|
// 表格最小宽度
|
|
2512
|
-
|
|
2417
|
+
let tableMinWidth = 0;
|
|
2513
2418
|
// 左边差量
|
|
2514
|
-
|
|
2419
|
+
const leftWidth = handLeftWidth();
|
|
2515
2420
|
tableMinWidth += leftWidth;
|
|
2516
2421
|
// 右边差量
|
|
2517
|
-
|
|
2422
|
+
const rightWidth = handRightWidth();
|
|
2518
2423
|
tableMinWidth += rightWidth;
|
|
2519
|
-
|
|
2424
|
+
const posJson = {
|
|
2520
2425
|
leftBol: false,
|
|
2521
2426
|
rightBol: false
|
|
2522
2427
|
};
|
|
2523
2428
|
// 显示列
|
|
2524
|
-
for (
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
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
|
-
|
|
2547
|
-
for (
|
|
2548
|
-
|
|
2549
|
-
if (
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
leftOps +=
|
|
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 (
|
|
2556
|
-
|
|
2460
|
+
if (i === leftArr.length - 1) {
|
|
2461
|
+
item.paraui_fixed_left_last = true;
|
|
2557
2462
|
} else {
|
|
2558
|
-
|
|
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
|
-
|
|
2567
|
-
for (
|
|
2568
|
-
|
|
2569
|
-
if (
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
rightOps +=
|
|
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 (
|
|
2576
|
-
|
|
2480
|
+
if (i === 0) {
|
|
2481
|
+
item.paraui_fixed_right_first = true;
|
|
2577
2482
|
} else {
|
|
2578
|
-
|
|
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
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
for (
|
|
2594
|
-
|
|
2595
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2556
|
+
const handReqData = data => {
|
|
2687
2557
|
if (data.columns && props.headData === undefined) {
|
|
2688
|
-
|
|
2558
|
+
const str = JSON.stringify(data.columns);
|
|
2689
2559
|
if (str !== JSON.stringify(originalHead)) {
|
|
2690
2560
|
setOriginalHead(data.columns);
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
for (
|
|
2694
|
-
|
|
2695
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2600
|
+
const setNowPageData = nowPageData => {
|
|
2731
2601
|
// 加载更多请求放在里面
|
|
2732
2602
|
if (constData.current.loadMoreUrl) {
|
|
2733
|
-
|
|
2603
|
+
const historyData = constData.current.historyData || [];
|
|
2734
2604
|
if (historyData.length > 0) {
|
|
2735
|
-
nowPageData = [
|
|
2605
|
+
nowPageData = [...historyData, ...nowPageData];
|
|
2736
2606
|
}
|
|
2737
2607
|
}
|
|
2738
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2768
|
-
|
|
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
|
-
|
|
2646
|
+
const handleRequestSort = (event, name) => {
|
|
2777
2647
|
// asc 升序 -> desc降序 -> undefined 无序
|
|
2778
|
-
|
|
2648
|
+
const index = orderFieldArr.indexOf(name);
|
|
2779
2649
|
if (index !== -1) {
|
|
2780
2650
|
// 排序过
|
|
2781
|
-
|
|
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
|
-
|
|
2798
|
-
|
|
2667
|
+
let orderFieldArrHand = [...orderFieldArr];
|
|
2668
|
+
let orderTypeArrHand = [...orderTypeArr];
|
|
2799
2669
|
// 单个排序
|
|
2800
2670
|
if (sortTableRadio) {
|
|
2801
|
-
|
|
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
|
-
|
|
2696
|
+
const handCheckValue = json => {
|
|
2827
2697
|
if (props.checkDefaultValue === undefined) setCheckJson(Object.assign({}, json));
|
|
2828
|
-
|
|
2698
|
+
const arr = Object.keys(json);
|
|
2829
2699
|
if (setCheck) {
|
|
2830
|
-
|
|
2831
|
-
for (
|
|
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
|
-
|
|
2712
|
+
const setAllCheck = (event, bol) => {
|
|
2843
2713
|
// 存在checkDefaultValue, {...checkJson}解决直接使用checkJson, 复选框会一闪
|
|
2844
2714
|
// 不存在checkDefaultValue,内部直接记录状态
|
|
2845
|
-
|
|
2846
|
-
for (
|
|
2847
|
-
|
|
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
|
-
|
|
2734
|
+
const selectCheck = (event, bol, key) => {
|
|
2865
2735
|
// 存在checkDefaultValue, {...checkJson}解决直接使用checkJson, 复选框会一闪
|
|
2866
2736
|
// 不存在checkDefaultValue,内部直接记录状态
|
|
2867
|
-
|
|
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
|
-
|
|
2747
|
+
const selectRadio = (event, val) => {
|
|
2878
2748
|
if (setRadio) setRadio(val, totalDataJson[val]);
|
|
2879
2749
|
};
|
|
2880
2750
|
/**
|
|
2881
2751
|
* 清空复选框选中值
|
|
2882
2752
|
*/
|
|
2883
|
-
|
|
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
|
-
|
|
2765
|
+
const changeSelectHead = (arr, item, isRest) => {
|
|
2896
2766
|
handHeadDataCom(arr);
|
|
2897
2767
|
setHeadDataCom(arr);
|
|
2898
|
-
|
|
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
|
-
|
|
2786
|
+
const changeShowList = (headShowArr, bol, item) => {
|
|
2917
2787
|
if (bol) {
|
|
2918
2788
|
constData.current.headDataConfig = {};
|
|
2919
2789
|
setHeadDataConfig({}); // 重置拖拽列
|
|
2920
|
-
|
|
2921
|
-
|
|
2790
|
+
const arr = [];
|
|
2791
|
+
const arrShow = [...showHeadList];
|
|
2922
2792
|
handSerial(arrShow);
|
|
2923
|
-
for (
|
|
2924
|
-
|
|
2925
|
-
if (
|
|
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(
|
|
2797
|
+
arr.push(item);
|
|
2928
2798
|
}
|
|
2929
2799
|
}
|
|
2930
2800
|
changeSelectHead(arr, item, true);
|
|
2931
2801
|
return;
|
|
2932
2802
|
}
|
|
2933
|
-
headShowArr.sort(
|
|
2803
|
+
headShowArr.sort((a, b) => {
|
|
2934
2804
|
return Number(a.orderNum) - Number(b.orderNum);
|
|
2935
2805
|
});
|
|
2936
|
-
|
|
2806
|
+
const headShowArrHand = [...headShowArr];
|
|
2937
2807
|
changeSelectHead(headShowArrHand, item);
|
|
2938
2808
|
};
|
|
2939
2809
|
/**
|
|
2940
2810
|
* 改变过滤
|
|
2941
2811
|
*/
|
|
2942
|
-
|
|
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
|
-
|
|
2949
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
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
|
-
|
|
3092
|
-
|
|
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
|
-
|
|
2974
|
+
const changeResize = () => {
|
|
3109
2975
|
tableBoxScroll({
|
|
3110
2976
|
target: containerRef.current
|
|
3111
2977
|
});
|