@para-ui/core 4.0.48 → 4.0.50
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/Cascader/index.js +5 -4
- package/ComboSelect/index.js +3 -2
- package/CycleSelector/index.js +4 -1
- package/DatePicker/index.js +4 -1
- package/DynamicMultiBox/index.js +3 -2
- package/Form/index.js +4 -3
- package/FormItem/index.js +4 -3
- package/Image/index.js +3 -2
- package/README.md +10 -0
- package/SingleBox/index.js +2 -2
- package/Stepper/index.js +1 -1
- package/Table/index.js +84 -26
- package/Table/interface.d.ts +0 -2
- package/Tag/index.js +87 -55
- package/TimePicker/index.js +4 -1
- package/Timeline/index.js +2 -1
- package/ToggleButton/index.js +2 -1
- package/Tree/index.js +4 -3
- package/Upload/index.js +19 -8
- package/Upload/interface.d.ts +2 -0
- package/Utils/Hooks/useResizeObserver.d.ts +8 -0
- package/_verture/{Portal-42560ff0.js → Portal-f9bedb3a.js} +2 -1
- package/_verture/{defineProperty-f0e15205.js → defineProperty-6f62bb2a.js} +2 -10
- package/_verture/{index-72981a9e.js → index-6647cbf6.js} +2 -1
- package/_verture/{index-063009f8.js → index-972707a5.js} +3 -2
- package/_verture/typeof-adeedc13.js +11 -0
- package/index.js +6 -5
- package/package.json +1 -1
- package/umd/ComboSelect.js +2 -2
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +4 -4
- package/umd/Table.js +4 -4
- package/umd/Upload.js +2 -2
- /package/_verture/{index-caffc0da.js → index-bd0da612.js} +0 -0
package/Cascader/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { C as Cascader } from '../_verture/index-
|
|
2
|
-
export { C as default } from '../_verture/index-
|
|
1
|
+
import { C as Cascader } from '../_verture/index-972707a5.js';
|
|
2
|
+
export { C as default } from '../_verture/index-972707a5.js';
|
|
3
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
|
-
import '../_verture/Portal-
|
|
5
|
+
import '../_verture/Portal-f9bedb3a.js';
|
|
6
6
|
import '../_verture/slicedToArray-75fa4188.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'react-dom';
|
|
9
|
-
import '../_verture/
|
|
9
|
+
import '../_verture/typeof-adeedc13.js';
|
|
10
10
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
11
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
11
12
|
import 'rc-motion';
|
|
12
13
|
import 'clsx';
|
|
13
14
|
import '../_verture/typeof-6ec38efd.js';
|
package/ComboSelect/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import SearchIcon from '@para-ui/icons/Search';
|
|
|
6
6
|
import Close from '@para-ui/icons/Close';
|
|
7
7
|
import CloseCircleF from '@para-ui/icons/CloseCircleF';
|
|
8
8
|
import Table from '../Table/index.js';
|
|
9
|
-
import { T as Tree } from '../_verture/index-
|
|
9
|
+
import { T as Tree } from '../_verture/index-6647cbf6.js';
|
|
10
10
|
import { Button } from '../Button/index.js';
|
|
11
11
|
import { D as Dropdown } from '../_verture/index-bde7aabe.js';
|
|
12
12
|
import { Popover } from '../Popover/index.js';
|
|
@@ -62,7 +62,8 @@ import '@para-ui/icons/DoubleRight';
|
|
|
62
62
|
import '../ScrollBar/index.js';
|
|
63
63
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
64
64
|
import '../_verture/slicedToArray-75fa4188.js';
|
|
65
|
-
import '../_verture/defineProperty-
|
|
65
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
66
|
+
import '../_verture/typeof-adeedc13.js';
|
|
66
67
|
import '../_verture/index-8ac46bd9.js';
|
|
67
68
|
import '../_verture/typeof-6ec38efd.js';
|
|
68
69
|
import 'rc-tree';
|
package/CycleSelector/index.js
CHANGED
|
@@ -19,6 +19,9 @@ import 'rc-picker/es/generate/dayjs';
|
|
|
19
19
|
import '../Tag/index.js';
|
|
20
20
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
21
21
|
import '@para-ui/icons/EditOutline';
|
|
22
|
+
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
23
|
+
import '../_verture/slicedToArray-75fa4188.js';
|
|
24
|
+
import '../_verture/typeof-adeedc13.js';
|
|
22
25
|
import '../AutoTips/index.js';
|
|
23
26
|
import '../Tooltip/index.js';
|
|
24
27
|
import 'rc-tooltip';
|
|
@@ -28,7 +31,7 @@ import '@paraview/lib';
|
|
|
28
31
|
import '../_verture/tinycolor-ece3542d.js';
|
|
29
32
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
30
33
|
import '@para-ui/icons/Plus';
|
|
31
|
-
import '../_verture/defineProperty-
|
|
34
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
32
35
|
import 'rc-picker';
|
|
33
36
|
import '@para-ui/icons/CloseCircleF';
|
|
34
37
|
import '@para-ui/icons/Calendar';
|
package/DatePicker/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import dayjsGenerateConfig from 'rc-picker/es/generate/dayjs';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Button } from '../Button/index.js';
|
|
4
4
|
import { Tag } from '../Tag/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
|
|
6
6
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
7
7
|
import React__default, { forwardRef, useImperativeHandle } from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -33,6 +33,9 @@ import '../_verture/usePopupContainer-635f66f4.js';
|
|
|
33
33
|
import 'dayjs';
|
|
34
34
|
import '@para-ui/icons/Close';
|
|
35
35
|
import '@para-ui/icons/EditOutline';
|
|
36
|
+
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
37
|
+
import '../_verture/slicedToArray-75fa4188.js';
|
|
38
|
+
import '../_verture/typeof-adeedc13.js';
|
|
36
39
|
import '../_verture/tinycolor-ece3542d.js';
|
|
37
40
|
import '../_verture/useGlobalProps-4ae1a007.js';
|
|
38
41
|
import '@para-ui/icons/Plus';
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -71,10 +71,11 @@ import '@para-ui/icons/Right';
|
|
|
71
71
|
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
73
|
import '../ScrollBar/index.js';
|
|
74
|
-
import '../_verture/index-
|
|
74
|
+
import '../_verture/index-6647cbf6.js';
|
|
75
75
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
76
76
|
import '../_verture/slicedToArray-75fa4188.js';
|
|
77
|
-
import '../_verture/defineProperty-
|
|
77
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
78
|
+
import '../_verture/typeof-adeedc13.js';
|
|
78
79
|
import '../_verture/index-8ac46bd9.js';
|
|
79
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
80
81
|
import 'rc-tree';
|
package/Form/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { DeepClone } from '@paraview/lib';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-
|
|
4
|
+
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-bd0da612.js';
|
|
5
5
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
6
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
7
7
|
import '../TextField/index.js';
|
|
@@ -72,9 +72,10 @@ import '@para-ui/icons/Right';
|
|
|
72
72
|
import '@para-ui/icons/DoubleLeft';
|
|
73
73
|
import '@para-ui/icons/DoubleRight';
|
|
74
74
|
import '../ScrollBar/index.js';
|
|
75
|
-
import '../_verture/index-
|
|
75
|
+
import '../_verture/index-6647cbf6.js';
|
|
76
76
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
77
|
-
import '../_verture/defineProperty-
|
|
77
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
78
|
+
import '../_verture/typeof-adeedc13.js';
|
|
78
79
|
import '../_verture/index-8ac46bd9.js';
|
|
79
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
80
81
|
import 'rc-tree';
|
package/FormItem/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-bd0da612.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-5317fc89.js';
|
|
@@ -72,9 +72,10 @@ import '@para-ui/icons/Right';
|
|
|
72
72
|
import '@para-ui/icons/DoubleLeft';
|
|
73
73
|
import '@para-ui/icons/DoubleRight';
|
|
74
74
|
import '../ScrollBar/index.js';
|
|
75
|
-
import '../_verture/index-
|
|
75
|
+
import '../_verture/index-6647cbf6.js';
|
|
76
76
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
77
|
-
import '../_verture/defineProperty-
|
|
77
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
78
|
+
import '../_verture/typeof-adeedc13.js';
|
|
78
79
|
import '../_verture/index-8ac46bd9.js';
|
|
79
80
|
import '../_verture/typeof-6ec38efd.js';
|
|
80
81
|
import 'rc-tree';
|
package/Image/index.js
CHANGED
|
@@ -2,9 +2,10 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, useContext, useMemo } from 'react';
|
|
5
|
-
import { i as warningOnce, d as wrapperRaf, _ as _objectSpread2, w as warning, c as clsx, P as Portal, K as KeyCode, b as _objectWithoutProperties, a as _extends, j as useMergedState } from '../_verture/Portal-
|
|
6
|
-
import { _ as
|
|
5
|
+
import { i as warningOnce, d as wrapperRaf, _ as _objectSpread2, w as warning, c as clsx, P as Portal, K as KeyCode, b as _objectWithoutProperties, a as _extends, j as useMergedState } from '../_verture/Portal-f9bedb3a.js';
|
|
6
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
|
|
7
7
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-75fa4188.js';
|
|
8
|
+
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
8
9
|
import Dialog from 'rc-dialog';
|
|
9
10
|
import ReactDOM from 'react-dom';
|
|
10
11
|
import CSSMotion from 'rc-motion';
|
package/README.md
CHANGED
package/SingleBox/index.js
CHANGED
|
@@ -39,8 +39,8 @@ var zh = {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
var localeJson = {
|
|
42
|
-
zh
|
|
43
|
-
en
|
|
42
|
+
zh,
|
|
43
|
+
en
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-single-box {\n display: inline-block;\n width: 100%;\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}\n.paraui-v4-single-box > .single-box-content {\n line-height: 0;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item {\n display: flex;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item .content-box {\n flex: 1;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item .content-box .single-box-text-field .paraui-v4-helper-text {\n min-height: 10px;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box {\n display: flex;\n align-items: center;\n margin-left: 10px;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box > .single-box-add {\n text-align: center;\n border: 1px dashed;\n border-color: rgb(212, 218, 227);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n cursor: pointer;\n background-color: rgb(247, 248, 250);\n color: rgb(46, 101, 230);\n font-size: 14px;\n}\n.paraui-v4-single-box > .single-box-add > svg {\n font-size: 16px;\n color: rgb(46, 101, 230);\n margin-right: 4px;\n}\n.paraui-v4-single-box > .single-box-add:hover {\n border-color: rgb(87, 131, 235);\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n cursor: not-allowed;\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover {\n background-color: transparent;\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add {\n border-color: rgb(212, 218, 227);\n cursor: not-allowed;\n background-color: rgb(247, 248, 250);\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add:hover {\n border-color: rgb(212, 218, 227);\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-content > .single-box-content-item > .opera-box {\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 28px;\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-add {\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-content > .single-box-content-item > .opera-box {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 32px;\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-add {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-content > .single-box-content-item > .opera-box {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 32px;\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-add {\n height: 32px;\n}";
|
package/Stepper/index.js
CHANGED
package/Table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef, useState, useEffect, useMemo, useCallback, Fragment as Fragment$1 } from 'react';
|
|
4
|
-
import { Get, Post, DeepClone, GetBrowserClass, Cancel, ArrayToObject } from '@paraview/lib';
|
|
4
|
+
import { Get, Post, DeepClone, GetBrowserClass, Cancel, ArrayToObject, UUID } from '@paraview/lib';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
6
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
7
7
|
import { Popover } from '../Popover/index.js';
|
|
@@ -1869,6 +1869,57 @@ const TableElement = props => {
|
|
|
1869
1869
|
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-virtual > .table-contain {\n margin-right: 8px;\n}\n.paraui-v4-table.paraui-v4-virtual > .table-contain::-webkit-scrollbar {\n width: 0;\n}\n.paraui-v4-table.paraui-v4-virtual.paraui-v4-table-pagination .paraui-v4-scroll-bar {\n height: calc(100% - 36px);\n}\n.paraui-v4-table.paraui-v4-virtual.table-scroll-left .paraui-v4-scroll-bar, .paraui-v4-table.paraui-v4-virtual.table-scroll-right .paraui-v4-scroll-bar, .paraui-v4-table.paraui-v4-virtual.table-scroll-middle .paraui-v4-scroll-bar {\n padding-bottom: 8px;\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 .drag-row {\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.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 td.table-operate > .table-operate-box {\n display: flex;\n align-items: center;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate > .table-operate-box .drag-btn-line {\n display: inline-block;\n width: 1px;\n height: 12px;\n background-color: rgb(213, 224, 250);\n margin: 0 10px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate > .table-operate-box .drag-row-btn {\n cursor: all-scroll;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate > .table-operate-box .drag-row-btn svg {\n font-size: 18px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate.table-operate-center {\n padding-right: 8px;\n}\n.paraui-v4-table > .table-contain > table > .table-body tr td.table-operate.table-operate-center > .table-operate-box {\n justify-content: center;\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(233, 239, 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}";
|
|
1870
1870
|
styleInject(css_248z);
|
|
1871
1871
|
|
|
1872
|
+
/**
|
|
1873
|
+
* @author linhd
|
|
1874
|
+
* @date 2024/12/23 10:45
|
|
1875
|
+
* @description 监听元素发生变化
|
|
1876
|
+
*/
|
|
1877
|
+
var useResizeObserver = function useResizeObserver(props) {
|
|
1878
|
+
var constData = useRef({});
|
|
1879
|
+
useEffect(function () {
|
|
1880
|
+
resizeObserverDom();
|
|
1881
|
+
return function () {
|
|
1882
|
+
clearInterval(constData.current.resizeTimer);
|
|
1883
|
+
clearTimeout(constData.current.resizeLimit);
|
|
1884
|
+
};
|
|
1885
|
+
}, [props.dom]);
|
|
1886
|
+
// 判断宽高发生变化
|
|
1887
|
+
var isChangeSize = function isChangeSize(rect) {
|
|
1888
|
+
var width = rect.width;
|
|
1889
|
+
var height = rect.height;
|
|
1890
|
+
if (width === constData.current.width && height === constData.current.height) {
|
|
1891
|
+
return;
|
|
1892
|
+
}
|
|
1893
|
+
constData.current.width = width;
|
|
1894
|
+
constData.current.height = height;
|
|
1895
|
+
clearTimeout(constData.current.resizeLimit);
|
|
1896
|
+
constData.current.resizeLimit = setTimeout(function () {
|
|
1897
|
+
props.cb();
|
|
1898
|
+
}, 100);
|
|
1899
|
+
};
|
|
1900
|
+
// 监听表格容器宽高发生变化
|
|
1901
|
+
var resizeObserverDom = function resizeObserverDom() {
|
|
1902
|
+
var dom = props.dom;
|
|
1903
|
+
if (!dom) return;
|
|
1904
|
+
if (window.ResizeObserver === undefined) {
|
|
1905
|
+
clearInterval(constData.current.resizeTimer);
|
|
1906
|
+
constData.current.resizeTimer = setInterval(function () {
|
|
1907
|
+
var tableRefEleRect = dom.getBoundingClientRect();
|
|
1908
|
+
isChangeSize(tableRefEleRect);
|
|
1909
|
+
});
|
|
1910
|
+
} else {
|
|
1911
|
+
// 创建一个ResizeObserver实例并传入回调函数
|
|
1912
|
+
var resizeObserver = new ResizeObserver(function (entries) {
|
|
1913
|
+
var _a;
|
|
1914
|
+
var contentRect = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect;
|
|
1915
|
+
isChangeSize(contentRect);
|
|
1916
|
+
});
|
|
1917
|
+
// 开始观察元素
|
|
1918
|
+
resizeObserver.observe(dom);
|
|
1919
|
+
}
|
|
1920
|
+
};
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1872
1923
|
const Table = propsInit => {
|
|
1873
1924
|
const props = useGlobalProps(propsInit, 'Table');
|
|
1874
1925
|
// 判断浏览器
|
|
@@ -1947,7 +1998,6 @@ const Table = propsInit => {
|
|
|
1947
1998
|
refreshInside = props.url ? true : false,
|
|
1948
1999
|
checkCount = props.check ? true : false,
|
|
1949
2000
|
onDragRow,
|
|
1950
|
-
resizePaginationLine,
|
|
1951
2001
|
virtual = false
|
|
1952
2002
|
} = props;
|
|
1953
2003
|
const intl = useFormatMessage('Table', localeJson);
|
|
@@ -1979,7 +2029,7 @@ const Table = propsInit => {
|
|
|
1979
2029
|
const [virtualCom, setVirtualCom] = useState(false);
|
|
1980
2030
|
const [virtualIndex, setVirtualIndex] = useState([0, 0]);
|
|
1981
2031
|
const [scrollTop, setScrollTop] = useState(0);
|
|
1982
|
-
useState(
|
|
2032
|
+
const [resizePaginationLine, setResizePaginationLine] = useState();
|
|
1983
2033
|
const containerRef = useRef(); // 表格内容高度
|
|
1984
2034
|
const tableRef = useRef(); // 表格
|
|
1985
2035
|
const tableEleRef = useRef(); // 表格元素
|
|
@@ -1987,6 +2037,10 @@ const Table = propsInit => {
|
|
|
1987
2037
|
page: props.page !== undefined ? props.page : 1,
|
|
1988
2038
|
headDataConfig: {}
|
|
1989
2039
|
}); // 存储常量
|
|
2040
|
+
useResizeObserver({
|
|
2041
|
+
dom: tableRef.current,
|
|
2042
|
+
cb: () => changeResize()
|
|
2043
|
+
});
|
|
1990
2044
|
constData.current.loadMoreUrl = loadMore && url; // 用来判断加载更多请求是否放在表格里面
|
|
1991
2045
|
constData.current.search = search;
|
|
1992
2046
|
constData.current.url = url;
|
|
@@ -1997,14 +2051,15 @@ const Table = propsInit => {
|
|
|
1997
2051
|
constData.current.searchKeyName = searchKeyName;
|
|
1998
2052
|
constData.current.filterSearchCallback = filterSearchCallback;
|
|
1999
2053
|
constData.current.onError = onError;
|
|
2054
|
+
constData.current.sizeCom = sizeCom;
|
|
2055
|
+
constData.current.virtual = virtual;
|
|
2056
|
+
constData.current.expandable = expandable;
|
|
2000
2057
|
useEffect(() => {
|
|
2001
|
-
window.addEventListener('resize', changeResize);
|
|
2002
2058
|
return () => {
|
|
2003
2059
|
constData.current.isDestroy = true;
|
|
2004
2060
|
clearTimeout(constData.current.reqTimer);
|
|
2005
2061
|
clearTimeout(constData.current.loadingTimer);
|
|
2006
2062
|
Cancel(reqId);
|
|
2007
|
-
window.removeEventListener('resize', changeResize);
|
|
2008
2063
|
};
|
|
2009
2064
|
}, []);
|
|
2010
2065
|
useEffect(() => {
|
|
@@ -2232,6 +2287,7 @@ const Table = propsInit => {
|
|
|
2232
2287
|
});
|
|
2233
2288
|
// 可视化窗口显示条数 / 第一次显示条数
|
|
2234
2289
|
const getVisibleWinNum = () => {
|
|
2290
|
+
if (!containerRef.current) return size;
|
|
2235
2291
|
let height = containerRef.current.clientHeight - 48;
|
|
2236
2292
|
if (props.loadMore) height -= lineHeight;
|
|
2237
2293
|
let num = Math.floor(height / lineHeight);
|
|
@@ -3078,7 +3134,7 @@ const Table = propsInit => {
|
|
|
3078
3134
|
resizePaginationLine: resizePaginationLine
|
|
3079
3135
|
});
|
|
3080
3136
|
}, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType, flippingArrow, refreshInside, checkCount, headSelectStatus, rowData, checkJson, disabledJson, totalDataJson, resizePaginationLine]);
|
|
3081
|
-
//
|
|
3137
|
+
// 表格内容左右滚动
|
|
3082
3138
|
const tableBoxScroll = e => {
|
|
3083
3139
|
const dom = tableRef.current;
|
|
3084
3140
|
const scrollDom = e.target;
|
|
@@ -3097,31 +3153,13 @@ const Table = propsInit => {
|
|
|
3097
3153
|
}
|
|
3098
3154
|
dom.classList.add('table-scroll-middle');
|
|
3099
3155
|
};
|
|
3100
|
-
// 处理class
|
|
3101
|
-
const handClass = () => {
|
|
3102
|
-
let str = "".concat($prefixCls, "-table");
|
|
3103
|
-
if (showColumns === 'inside') str += " ".concat($prefixCls, "-table-columns-inside");
|
|
3104
|
-
if (pagination) str += " ".concat($prefixCls, "-table-pagination");
|
|
3105
|
-
if (loadMore) str += " ".concat($prefixCls, "-table-load-more");
|
|
3106
|
-
if (fixedTable) str += " ".concat($prefixCls, "-table-fixed-table");
|
|
3107
|
-
if (fixedColumn) str += " ".concat($prefixCls, "-table-fixed-cloumn");
|
|
3108
|
-
if (dragColumn) str += " ".concat($prefixCls, "-table-drag-column");
|
|
3109
|
-
if (dragRow) str += " ".concat($prefixCls, "-table-drag-row");
|
|
3110
|
-
if (check) str += " ".concat($prefixCls, "-table-check");
|
|
3111
|
-
if (radio) str += " ".concat($prefixCls, "-table-radio");
|
|
3112
|
-
if (expandable) str += " ".concat($prefixCls, "-table-expandable");
|
|
3113
|
-
if (rowData.length === 0) str += " ".concat($prefixCls, "-table-no-data");
|
|
3114
|
-
if (loadState) str += " ".concat($prefixCls, "-table-load");
|
|
3115
|
-
if (virtualCom) str += " ".concat($prefixCls, "-virtual");
|
|
3116
|
-
if (className) str += " ".concat(className);
|
|
3117
|
-
return str;
|
|
3118
|
-
};
|
|
3119
3156
|
// 改变屏幕大小
|
|
3120
3157
|
const changeResize = () => {
|
|
3121
3158
|
handleVirtualizedIndex();
|
|
3122
3159
|
tableBoxScroll({
|
|
3123
3160
|
target: containerRef.current
|
|
3124
3161
|
});
|
|
3162
|
+
setResizePaginationLine(UUID());
|
|
3125
3163
|
};
|
|
3126
3164
|
// 计算虚拟列表滚动索引
|
|
3127
3165
|
const handleVirtualizedIndex = () => {
|
|
@@ -3130,7 +3168,7 @@ const Table = propsInit => {
|
|
|
3130
3168
|
// 索引差量 上下10条
|
|
3131
3169
|
const indexDiff = 10;
|
|
3132
3170
|
// 每页显示条数 > 可视窗口显示条数 + 2倍索引差量 + 开启条数 开启虚拟滚动
|
|
3133
|
-
if (virtual && !expandable && Number(sizeCom) > visibleWinNum + 2 * indexDiff) {
|
|
3171
|
+
if (constData.current.virtual && !constData.current.expandable && Number(constData.current.sizeCom) > visibleWinNum + 2 * indexDiff) {
|
|
3134
3172
|
setVirtualCom(true);
|
|
3135
3173
|
// 最大滚动距离 超出说明到底部,定制向下滚动
|
|
3136
3174
|
const maxScroll = tableEleRef.current.clientHeight - containerRef.current.clientHeight;
|
|
@@ -3151,6 +3189,7 @@ const Table = propsInit => {
|
|
|
3151
3189
|
setVirtualCom(false); // 不显示虚拟滚动条
|
|
3152
3190
|
}
|
|
3153
3191
|
};
|
|
3192
|
+
// 渲染虚拟滚动条
|
|
3154
3193
|
const handleVirtualScroll = () => {
|
|
3155
3194
|
if (!virtualCom) return null;
|
|
3156
3195
|
return jsx(ScrollBar, {
|
|
@@ -3167,6 +3206,25 @@ const Table = propsInit => {
|
|
|
3167
3206
|
}
|
|
3168
3207
|
});
|
|
3169
3208
|
};
|
|
3209
|
+
// 处理class
|
|
3210
|
+
const handClass = () => {
|
|
3211
|
+
let str = "".concat($prefixCls, "-table");
|
|
3212
|
+
if (showColumns === 'inside') str += " ".concat($prefixCls, "-table-columns-inside");
|
|
3213
|
+
if (pagination) str += " ".concat($prefixCls, "-table-pagination");
|
|
3214
|
+
if (loadMore) str += " ".concat($prefixCls, "-table-load-more");
|
|
3215
|
+
if (fixedTable) str += " ".concat($prefixCls, "-table-fixed-table");
|
|
3216
|
+
if (fixedColumn) str += " ".concat($prefixCls, "-table-fixed-cloumn");
|
|
3217
|
+
if (dragColumn) str += " ".concat($prefixCls, "-table-drag-column");
|
|
3218
|
+
if (dragRow) str += " ".concat($prefixCls, "-table-drag-row");
|
|
3219
|
+
if (check) str += " ".concat($prefixCls, "-table-check");
|
|
3220
|
+
if (radio) str += " ".concat($prefixCls, "-table-radio");
|
|
3221
|
+
if (expandable) str += " ".concat($prefixCls, "-table-expandable");
|
|
3222
|
+
if (rowData.length === 0) str += " ".concat($prefixCls, "-table-no-data");
|
|
3223
|
+
if (loadState) str += " ".concat($prefixCls, "-table-load");
|
|
3224
|
+
if (virtualCom) str += " ".concat($prefixCls, "-virtual");
|
|
3225
|
+
if (className) str += " ".concat(className);
|
|
3226
|
+
return str;
|
|
3227
|
+
};
|
|
3170
3228
|
return jsxs("div", Object.assign({
|
|
3171
3229
|
className: handClass(),
|
|
3172
3230
|
style: style,
|
package/Table/interface.d.ts
CHANGED
|
@@ -191,8 +191,6 @@ export interface TableProps extends TableHeadBodyPublicProps {
|
|
|
191
191
|
flippingArrow?: PaginationFlippingArrow[];
|
|
192
192
|
/** 自适应分页,根据外容器大小,改变分页模式 */
|
|
193
193
|
autoPagination?: boolean;
|
|
194
|
-
/** 重新计算分页换行不换行 */
|
|
195
|
-
resizePaginationLine?: string | number;
|
|
196
194
|
/** 渲染表格一行数据 (跟表格头部head里面的render参数互斥) */
|
|
197
195
|
tableCell?: (row: any, params: any) => ReactNode;
|
|
198
196
|
/** 请求回调参数 requestCallback(data, cb) cb(data) 需要回调数据回来 */
|