@para-ui/core 4.0.46 → 4.0.47

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.
@@ -59,6 +59,7 @@ import 'rc-pagination';
59
59
  import '@para-ui/icons/Right';
60
60
  import '@para-ui/icons/DoubleLeft';
61
61
  import '@para-ui/icons/DoubleRight';
62
+ import '../ScrollBar/index.js';
62
63
  import '../_verture/toConsumableArray-c7a8028f.js';
63
64
  import '../_verture/slicedToArray-75fa4188.js';
64
65
  import '../_verture/defineProperty-6f62bb2a.js';
@@ -70,6 +70,7 @@ import 'rc-pagination';
70
70
  import '@para-ui/icons/Right';
71
71
  import '@para-ui/icons/DoubleLeft';
72
72
  import '@para-ui/icons/DoubleRight';
73
+ import '../ScrollBar/index.js';
73
74
  import '../_verture/index-6647cbf6.js';
74
75
  import '../_verture/toConsumableArray-c7a8028f.js';
75
76
  import '../_verture/slicedToArray-75fa4188.js';
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-bc7b7394.js';
4
+ import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-73a0446f.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';
@@ -71,6 +71,7 @@ import 'rc-pagination';
71
71
  import '@para-ui/icons/Right';
72
72
  import '@para-ui/icons/DoubleLeft';
73
73
  import '@para-ui/icons/DoubleRight';
74
+ import '../ScrollBar/index.js';
74
75
  import '../_verture/index-6647cbf6.js';
75
76
  import '../_verture/toConsumableArray-c7a8028f.js';
76
77
  import '../_verture/defineProperty-6f62bb2a.js';
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-bc7b7394.js';
3
+ export { F as default } from '../_verture/index-73a0446f.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-5317fc89.js';
@@ -71,6 +71,7 @@ import 'rc-pagination';
71
71
  import '@para-ui/icons/Right';
72
72
  import '@para-ui/icons/DoubleLeft';
73
73
  import '@para-ui/icons/DoubleRight';
74
+ import '../ScrollBar/index.js';
74
75
  import '../_verture/index-6647cbf6.js';
75
76
  import '../_verture/toConsumableArray-c7a8028f.js';
76
77
  import '../_verture/defineProperty-6f62bb2a.js';
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 🎉 para-ui/core@4.0.47 发布
2
+
3
+ 🔧【Bugfix】
4
+ - 【表格-Table】表格新增虚拟滚动
5
+
1
6
  ## 🎉 para-ui/core@4.0.46 发布
2
7
 
3
8
  🎁【Feature】
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @author linhd
3
+ * @date 2024/12/13 11:15
4
+ * @description 自定义滚动条
5
+ */
6
+ import React, { FunctionComponent } from 'react';
7
+ import './index.scss';
8
+ interface Props {
9
+ /** 样式class */
10
+ className?: string;
11
+ /** style */
12
+ style?: React.CSSProperties;
13
+ /** 模式 横 竖 */
14
+ type?: 'horizontal' | 'vertical';
15
+ /** 滚动总长 */
16
+ scrollTotalLength?: number;
17
+ /** 大小 */
18
+ size?: 'small' | 'medium' | 'large';
19
+ /** 颜色 */
20
+ color?: 'deep' | 'light';
21
+ /** 外部滚动距离 */
22
+ scrollLength?: number;
23
+ /** 滚动事件 */
24
+ onScroll?: (val: number) => void;
25
+ }
26
+ declare const ScrollBar: FunctionComponent<Props>;
27
+ export default ScrollBar;
@@ -0,0 +1,153 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useRef, useEffect } from 'react';
3
+ import clsx from 'clsx';
4
+ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
5
+ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
6
+
7
+ var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-scroll-bar {\n overflow: hidden;\n position: relative;\n}\n.paraui-v4-scroll-bar > .slider {\n position: relative;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-horizontal {\n width: 100%;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-horizontal > .slider {\n height: 100%;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-vertical {\n height: 100%;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-vertical > .slider {\n width: 100%;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-small > .slider, .paraui-v4-scroll-bar.paraui-v4-scroll-bar-medium > .slider {\n border-radius: 4px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-small.paraui-v4-scroll-bar-horizontal, .paraui-v4-scroll-bar.paraui-v4-scroll-bar-medium.paraui-v4-scroll-bar-horizontal {\n height: 4px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-small.paraui-v4-scroll-bar-vertical, .paraui-v4-scroll-bar.paraui-v4-scroll-bar-medium.paraui-v4-scroll-bar-vertical {\n width: 4px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-large > .slider {\n border-radius: 8px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-large.paraui-v4-scroll-bar-horizontal {\n height: 8px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-large.paraui-v4-scroll-bar-vertical {\n width: 8px;\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-light {\n background-color: rgb(234, 236, 241);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-light > .slider {\n background-color: rgb(161, 168, 179);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-light > .slider:hover {\n background-color: rgb(212, 218, 227);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-light.paraui-v4-scroll-bar-move > .slider {\n background-color: rgb(212, 218, 227);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-deep {\n background-color: rgb(92, 101, 115);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-deep > .slider {\n background-color: rgb(212, 218, 227);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-deep > .slider:hover {\n background-color: rgb(161, 168, 179);\n}\n.paraui-v4-scroll-bar.paraui-v4-scroll-bar-deep.paraui-v4-scroll-bar-move > .slider {\n background-color: rgb(161, 168, 179);\n}";
8
+ styleInject(css_248z);
9
+
10
+ const ScrollBar = props => {
11
+ const {
12
+ className,
13
+ style,
14
+ type = 'vertical',
15
+ size = 'large',
16
+ color = 'light',
17
+ scrollTotalLength,
18
+ scrollLength,
19
+ onScroll
20
+ } = props;
21
+ const boxRef = useRef(null);
22
+ const sliderRef = useRef(null);
23
+ const constData = useRef({
24
+ typeMap: {
25
+ vertical: {
26
+ length: 'height',
27
+ movePage: 'pageY',
28
+ pos: 'top',
29
+ startPos: 'offsetTop'
30
+ },
31
+ horizontal: {
32
+ length: 'width',
33
+ movePage: 'pageX',
34
+ pos: 'left',
35
+ startPos: 'offsetLeft'
36
+ }
37
+ },
38
+ moveMaxLength: 0,
39
+ startLength: 0,
40
+ visualWindowLength: 0,
41
+ scrollTotalLength: 0,
42
+ sliderLength: 0,
43
+ scrollLength: 0
44
+ });
45
+ constData.current.scrollTotalLength = scrollTotalLength;
46
+ constData.current.scrollLength = scrollLength;
47
+ useEffect(() => {
48
+ intl();
49
+ window.addEventListener('resize', resize);
50
+ return () => {
51
+ window.removeEventListener("resize", resize);
52
+ };
53
+ }, []);
54
+ useEffect(() => {
55
+ handleSliderLength();
56
+ handleTop();
57
+ }, [scrollLength, scrollTotalLength]);
58
+ const resize = () => {
59
+ handleSliderLength();
60
+ handleTop();
61
+ };
62
+ // 计算滑块的 宽 高
63
+ const handleSliderLength = () => {
64
+ const boxRefEle = boxRef.current;
65
+ const sliderRefEle = sliderRef.current;
66
+ if (!scrollTotalLength || !boxRefEle || !sliderRefEle) return;
67
+ const boxRefEleRect = boxRefEle.getBoundingClientRect();
68
+ const lengthName = constData.current.typeMap[type].length;
69
+ const visualWindowLengthCom = boxRefEleRect[lengthName];
70
+ // 可视窗口长度 / 总长 * 可视窗口长度
71
+ let sliderLength = visualWindowLengthCom / scrollTotalLength * visualWindowLengthCom;
72
+ if (sliderLength < 16) sliderLength = 16;
73
+ sliderRefEle.style[lengthName] = sliderLength / visualWindowLengthCom * 100 + '%';
74
+ constData.current.moveMaxLength = visualWindowLengthCom - sliderLength;
75
+ constData.current.visualWindowLength = visualWindowLengthCom;
76
+ constData.current.sliderLength = sliderLength;
77
+ };
78
+ // 初始化
79
+ const intl = () => {
80
+ const boxRefEle = boxRef.current;
81
+ const sliderRefEle = sliderRef.current;
82
+ if (!boxRefEle || !sliderRefEle) return;
83
+ const pos = constData.current.typeMap[type].pos;
84
+ const startPos = constData.current.typeMap[type].startPos;
85
+ const movePage = constData.current.typeMap[type].movePage;
86
+ // 移动
87
+ const moveFunc = (event, e) => {
88
+ let moveLength = event[movePage] - e[movePage]; // 鼠标移动的距离
89
+ moveLength = constData.current.startLength + moveLength;
90
+ if (moveLength < 0) moveLength = 0;
91
+ if (moveLength > constData.current.moveMaxLength) moveLength = constData.current.moveMaxLength;
92
+ sliderRefEle.style[pos] = moveLength / constData.current.visualWindowLength * 100 + '%';
93
+ onScroll && onScroll(moveLength / constData.current.moveMaxLength * constData.current.scrollTotalLength);
94
+ };
95
+ // 抬起
96
+ const endFunc = () => {
97
+ boxRefEle.classList.remove("".concat($prefixCls, "-scroll-bar-move"));
98
+ };
99
+ boxRefEle.onmousedown = e => {
100
+ boxRefEle.classList.add("".concat($prefixCls, "-scroll-bar-move"));
101
+ constData.current.startLength = sliderRefEle[startPos];
102
+ document.onmousemove = event => {
103
+ moveFunc(event, e);
104
+ };
105
+ document.onmouseup = () => {
106
+ document.onmousemove = null;
107
+ document.onmouseup = null;
108
+ endFunc();
109
+ };
110
+ };
111
+ boxRefEle.ontouchstart = touchE => {
112
+ touchE.preventDefault();
113
+ const e = touchE.touches[0];
114
+ constData.current.startLength = sliderRefEle[startPos];
115
+ document.ontouchmove = touchEvent => {
116
+ touchEvent.preventDefault();
117
+ const event = touchEvent.touches[0];
118
+ moveFunc(event, e);
119
+ return false;
120
+ };
121
+ // 鼠标抬起
122
+ document.ontouchend = () => {
123
+ document.ontouchmove = null;
124
+ document.ontouchend = null;
125
+ endFunc();
126
+ };
127
+ return false;
128
+ };
129
+ };
130
+ // 处理鼠标滚轮滚动top定位
131
+ const handleTop = () => {
132
+ const sliderRefEle = sliderRef.current;
133
+ if (!sliderRefEle) return;
134
+ const pos = constData.current.typeMap[type].pos;
135
+ // 当前组件滚动总长与总长比
136
+ const a = constData.current.moveMaxLength / constData.current.visualWindowLength;
137
+ // 真实滚动总长与总长比
138
+ let b = Number(constData.current.scrollLength) / constData.current.scrollTotalLength;
139
+ sliderRefEle.style[pos] = a * b * 100 + '%';
140
+ };
141
+ return jsx("div", Object.assign({
142
+ className: clsx("".concat($prefixCls, "-scroll-bar ").concat($prefixCls, "-scroll-bar-").concat(type, " ").concat($prefixCls, "-scroll-bar-").concat(size, " ").concat($prefixCls, "-scroll-bar-").concat(color), className),
143
+ style: style,
144
+ ref: boxRef
145
+ }, {
146
+ children: jsx("div", {
147
+ ref: sliderRef,
148
+ className: 'slider'
149
+ })
150
+ }));
151
+ };
152
+
153
+ export { ScrollBar as default };
package/Stepper/index.js CHANGED
@@ -24,7 +24,7 @@ import '@para-ui/icons/Forbid';
24
24
  import '@paraview/lib';
25
25
 
26
26
  //默认图标
27
- var Icons = {
27
+ const Icons = {
28
28
  1: jsx(One, {
29
29
  size: "medium"
30
30
  }),
package/Table/index.js CHANGED
@@ -23,6 +23,7 @@ import Refresh from '@para-ui/icons/Refresh';
23
23
  import { Pagination } from '../Pagination/index.js';
24
24
  import { Loading } from '../Loading/index.js';
25
25
  import { u as useGlobalProps } from '../_verture/useGlobalProps-4ae1a007.js';
26
+ import ScrollBar from '../ScrollBar/index.js';
26
27
  import '../Tooltip/index.js';
27
28
  import 'rc-tooltip';
28
29
  import 'rc-tooltip/lib/placements';
@@ -1130,7 +1131,9 @@ const TableBody = props => {
1130
1131
  tipMaxWidth,
1131
1132
  lineHeight,
1132
1133
  dragRow,
1133
- onDragRow
1134
+ onDragRow,
1135
+ virtualIndex,
1136
+ virtual
1134
1137
  } = props;
1135
1138
  const [expandableColSpan, setExpandableColSpan] = useState(0); // 嵌套表格合并列数
1136
1139
  const [expandableRow, setExpandableRow] = useState({}); // 当前哪行展开表格嵌套
@@ -1615,12 +1618,17 @@ const TableBody = props => {
1615
1618
  }));
1616
1619
  }, [expandableColSpan, loadMore, loadMoreRender, onClickMore, showMoreBtn, changePage, loadMoreUrl, lineHeight]);
1617
1620
  const TableBodySubjectContentMemo = useMemo(() => {
1621
+ let rowDataCom = rowData;
1622
+ if (virtual) {
1623
+ rowDataCom = rowDataCom.slice(virtualIndex[0], virtualIndex[1]);
1624
+ }
1618
1625
  return jsx(Fragment, {
1619
- children: rowData.map((row, index) => {
1626
+ children: rowDataCom.map((row, idx) => {
1620
1627
  let str = 'table-body-row';
1621
1628
  if (rowClassMapping && rowClassMapping[row[rowKey]]) {
1622
1629
  str += " ".concat(rowClassMapping[row[rowKey]]);
1623
1630
  }
1631
+ const index = idx + virtualIndex[0];
1624
1632
  return jsxs(Fragment$1, {
1625
1633
  children: [jsxs(TrElement, Object.assign({
1626
1634
  className: str,
@@ -1636,13 +1644,15 @@ const TableBody = props => {
1636
1644
  }, index);
1637
1645
  })
1638
1646
  });
1639
- }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow, rowClassMapping, tipMaxWidth, lineHeight, dragRow, onDragRow, dragBol]);
1647
+ }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, disabledExpandJson, onExpand, disabledArrStatus, showColumns, onClickRow, rowClassMapping, tipMaxWidth, lineHeight, dragRow, onDragRow, dragBol, virtualIndex, virtual]);
1640
1648
  // 内容memo
1641
1649
  const TableBodyContentMemo = useMemo(() => {
1642
1650
  return jsxs(Fragment$1, {
1643
- children: [TableBodySubjectContentMemo, MoreMemo]
1651
+ children: [TableBodySubjectContentMemo, MoreMemo, virtual && jsx(TrElement, {
1652
+ className: 'virtual-scroll-height'
1653
+ })]
1644
1654
  });
1645
- }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, loadMore, loadMoreRender, onClickMore, changePage, loadMoreUrl, disabledExpandJson, onExpand, showMoreBtn, disabledArrStatus, showColumns, onClickRow, rowClassMapping, tipMaxWidth, lineHeight, dragRow, onDragRow, dragBol]);
1655
+ }, [rowData, rowKey, disabledJson, checkJson, radio, radioValue, expandable, expandableRow, tableCell, headData, align, operate, expandableColSpan, selectCheck, selectRadio, loadMore, loadMoreRender, onClickMore, changePage, loadMoreUrl, disabledExpandJson, onExpand, showMoreBtn, disabledArrStatus, showColumns, onClickRow, rowClassMapping, tipMaxWidth, lineHeight, dragRow, onDragRow, dragBol, virtualIndex, virtual]);
1646
1656
  // 处理内容
1647
1657
  const handContent = () => {
1648
1658
  // 无数据,且不再请求,显示暂无数据
@@ -1667,13 +1677,23 @@ const TableBody = props => {
1667
1677
  setDragBol(false);
1668
1678
  onDragRow && onDragRow(evt);
1669
1679
  };
1680
+ const handleStyle = () => {
1681
+ const obj = {};
1682
+ if (virtual) {
1683
+ obj.height = rowData.length * lineHeight + 'px';
1684
+ obj.position = 'relative';
1685
+ obj.top = virtualIndex[0] * lineHeight + 'px';
1686
+ }
1687
+ return obj;
1688
+ };
1670
1689
  return jsx(TableBodyElement, Object.assign({
1671
1690
  className: handClass(),
1672
1691
  drag: dragRow,
1673
1692
  handle: '.drag-row-btn',
1674
1693
  list: handleRowData(),
1675
1694
  onDrag: onDragRowCom,
1676
- onChoose: onChoose
1695
+ onChoose: onChoose,
1696
+ style: handleStyle()
1677
1697
  }, {
1678
1698
  children: handContent()
1679
1699
  }));
@@ -1827,9 +1847,10 @@ const TableElement = props => {
1827
1847
  className,
1828
1848
  style,
1829
1849
  fixedColumn,
1830
- children
1850
+ children,
1851
+ cRef
1831
1852
  } = props,
1832
- otherProps = __rest(props, ["className", "style", "fixedColumn", "children"]);
1853
+ otherProps = __rest(props, ["className", "style", "fixedColumn", "children", "cRef"]);
1833
1854
  const handClass = () => {
1834
1855
  let str = 'table-element';
1835
1856
  if (fixedColumn) str += ' table-element-fixed-column';
@@ -1838,13 +1859,14 @@ const TableElement = props => {
1838
1859
  };
1839
1860
  return jsx("table", Object.assign({
1840
1861
  className: handClass(),
1841
- style: style
1862
+ style: style,
1863
+ ref: cRef
1842
1864
  }, otherProps, {
1843
1865
  children: children
1844
1866
  }));
1845
1867
  };
1846
1868
 
1847
- 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 .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}";
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}";
1848
1870
  styleInject(css_248z);
1849
1871
 
1850
1872
  const Table = propsInit => {
@@ -1925,7 +1947,8 @@ const Table = propsInit => {
1925
1947
  refreshInside = props.url ? true : false,
1926
1948
  checkCount = props.check ? true : false,
1927
1949
  onDragRow,
1928
- resizePaginationLine
1950
+ resizePaginationLine,
1951
+ virtual = false
1929
1952
  } = props;
1930
1953
  const intl = useFormatMessage('Table', localeJson);
1931
1954
  const dayNum = props.expirationTime ? props.expirationTime === 0 ? 100000000 : props.expirationTime : 7; // 过期天数
@@ -1953,8 +1976,13 @@ const Table = propsInit => {
1953
1976
  const [tableMinWidth, setTableMinWidth] = useState(0); // 表格最小width
1954
1977
  const [posFixed, setPosFixed] = useState({}); // 固定位置
1955
1978
  const [headDataConfig, setHeadDataConfig] = useState({}); // 表头配置
1979
+ const [virtualCom, setVirtualCom] = useState(false);
1980
+ const [virtualIndex, setVirtualIndex] = useState([0, 0]);
1981
+ const [scrollTop, setScrollTop] = useState(0);
1982
+ useState(0);
1956
1983
  const containerRef = useRef(); // 表格内容高度
1957
1984
  const tableRef = useRef(); // 表格
1985
+ const tableEleRef = useRef(); // 表格元素
1958
1986
  const constData = useRef({
1959
1987
  page: props.page !== undefined ? props.page : 1,
1960
1988
  headDataConfig: {}
@@ -2003,13 +2031,7 @@ const Table = propsInit => {
2003
2031
  handSize(size);
2004
2032
  } else {
2005
2033
  if (containerRef && containerRef.current) {
2006
- let height = containerRef.current.clientHeight - 48;
2007
- if (props.loadMore) height -= lineHeight;
2008
- let num = Math.floor(height / lineHeight);
2009
- /*// 取余大于0.5,加一条
2010
- const numRemainder = height % lineHeight / lineHeight;
2011
- if (numRemainder > 0.5) num += 1;*/
2012
- const columnsNUmber = num < 1 ? size : num;
2034
+ const columnsNUmber = getVisibleWinNum();
2013
2035
  if (sizeArr.indexOf(columnsNUmber) === -1) {
2014
2036
  sizeArr.unshift(columnsNUmber);
2015
2037
  // 数组排序
@@ -2198,12 +2220,27 @@ const Table = propsInit => {
2198
2220
  }
2199
2221
  }
2200
2222
  }, [checkJson, rowData, disabledJson]);
2223
+ // 计算表格虚拟滚动
2224
+ useEffect(() => {
2225
+ handleVirtualizedIndex();
2226
+ }, [virtual, rowData, expandable]);
2201
2227
  // 表格更新计算是否有滚动条
2202
2228
  useEffect(() => {
2203
2229
  tableBoxScroll({
2204
2230
  target: containerRef.current
2205
2231
  });
2206
2232
  });
2233
+ // 可视化窗口显示条数 / 第一次显示条数
2234
+ const getVisibleWinNum = () => {
2235
+ let height = containerRef.current.clientHeight - 48;
2236
+ if (props.loadMore) height -= lineHeight;
2237
+ let num = Math.floor(height / lineHeight);
2238
+ /*// 取余大于0.5,加一条
2239
+ const numRemainder = height % lineHeight / lineHeight;
2240
+ if (numRemainder > 0.5) num += 1;*/
2241
+ const columnsNUmber = num < 1 ? size : num;
2242
+ return columnsNUmber;
2243
+ };
2207
2244
  /** 设置size */
2208
2245
  const handSize = num => {
2209
2246
  constData.current.size = num;
@@ -3010,9 +3047,11 @@ const Table = propsInit => {
3010
3047
  tipMaxWidth: tipMaxWidth,
3011
3048
  lineHeight: lineHeight,
3012
3049
  dragRow: dragRow,
3013
- onDragRow: onDragRowCom
3050
+ onDragRow: onDragRowCom,
3051
+ virtualIndex: virtualIndex,
3052
+ virtual: virtualCom
3014
3053
  });
3015
- }, [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, dragRow, onDragRow]);
3054
+ }, [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, dragRow, onDragRow, virtualIndex, virtual, virtualCom]);
3016
3055
  // 表格分页memo
3017
3056
  const TablePaginationMemo = useMemo(() => {
3018
3057
  if (constData.current.page === null || constData.current.size === null || loadMore) return;
@@ -3073,15 +3112,61 @@ const Table = propsInit => {
3073
3112
  if (expandable) str += " ".concat($prefixCls, "-table-expandable");
3074
3113
  if (rowData.length === 0) str += " ".concat($prefixCls, "-table-no-data");
3075
3114
  if (loadState) str += " ".concat($prefixCls, "-table-load");
3115
+ if (virtualCom) str += " ".concat($prefixCls, "-virtual");
3076
3116
  if (className) str += " ".concat(className);
3077
3117
  return str;
3078
3118
  };
3079
3119
  // 改变屏幕大小
3080
3120
  const changeResize = () => {
3121
+ handleVirtualizedIndex();
3081
3122
  tableBoxScroll({
3082
3123
  target: containerRef.current
3083
3124
  });
3084
3125
  };
3126
+ // 计算虚拟列表滚动索引
3127
+ const handleVirtualizedIndex = () => {
3128
+ // 可视窗口显示条数
3129
+ const visibleWinNum = getVisibleWinNum();
3130
+ // 索引差量 上下10条
3131
+ const indexDiff = 10;
3132
+ // 每页显示条数 > 可视窗口显示条数 + 2倍索引差量 + 开启条数 开启虚拟滚动
3133
+ if (virtual && !expandable && Number(sizeCom) > visibleWinNum + 2 * indexDiff) {
3134
+ setVirtualCom(true);
3135
+ // 最大滚动距离 超出说明到底部,定制向下滚动
3136
+ const maxScroll = tableEleRef.current.clientHeight - containerRef.current.clientHeight;
3137
+ if (containerRef.current.scrollTop >= maxScroll) {
3138
+ // 滚动到底部
3139
+ containerRef.current.scrollTop = maxScroll;
3140
+ setScrollTop(maxScroll);
3141
+ }
3142
+ setScrollTop(containerRef.current.scrollTop);
3143
+ const scrollDom = containerRef.current;
3144
+ // 上索引
3145
+ const topIndex = Math.floor(scrollDom.scrollTop / lineHeight);
3146
+ // 下索引
3147
+ const bottomIndex = topIndex + visibleWinNum + indexDiff;
3148
+ setVirtualIndex([topIndex, bottomIndex]);
3149
+ } else {
3150
+ setVirtualIndex([0, 0]);
3151
+ setVirtualCom(false); // 不显示虚拟滚动条
3152
+ }
3153
+ };
3154
+ const handleVirtualScroll = () => {
3155
+ if (!virtualCom) return null;
3156
+ return jsx(ScrollBar, {
3157
+ style: {
3158
+ position: 'absolute',
3159
+ top: 0,
3160
+ right: 0,
3161
+ zIndex: 100
3162
+ },
3163
+ scrollTotalLength: tableEleRef.current.clientHeight - containerRef.current.clientHeight,
3164
+ scrollLength: scrollTop,
3165
+ onScroll: scrollH => {
3166
+ containerRef.current.scrollTop = scrollH;
3167
+ }
3168
+ });
3169
+ };
3085
3170
  return jsxs("div", Object.assign({
3086
3171
  className: handClass(),
3087
3172
  style: style,
@@ -3090,9 +3175,13 @@ const Table = propsInit => {
3090
3175
  children: [jsx(TableContainer, Object.assign({
3091
3176
  className: "table-contain",
3092
3177
  cRef: containerRef,
3093
- onScroll: tableBoxScroll
3178
+ onScroll: e => {
3179
+ handleVirtualizedIndex();
3180
+ tableBoxScroll(e);
3181
+ }
3094
3182
  }, {
3095
3183
  children: jsxs(TableElement, Object.assign({
3184
+ cRef: tableEleRef,
3096
3185
  fixedColumn: fixedColumn,
3097
3186
  style: {
3098
3187
  minWidth: "".concat(tableMinWidth, "px")
@@ -3100,7 +3189,7 @@ const Table = propsInit => {
3100
3189
  }, {
3101
3190
  children: [TableHeadMemo, TableBodyMemo]
3102
3191
  }))
3103
- })), loadState && jsx(Loading, {}), TablePaginationMemo]
3192
+ })), handleVirtualScroll(), loadState && jsx(Loading, {}), TablePaginationMemo]
3104
3193
  }));
3105
3194
  };
3106
3195
 
@@ -223,6 +223,8 @@ export interface TableProps extends TableHeadBodyPublicProps {
223
223
  dragColumn?: boolean;
224
224
  /** 拖动行 */
225
225
  dragRow?: boolean;
226
+ /** 虚拟滚动 嵌套表格不适用 */
227
+ virtual?: boolean;
226
228
  /** 是否过滤 */
227
229
  filter?: boolean;
228
230
  /** 排序 多个/单个 */
@@ -76,4 +76,8 @@ export interface TableBodyProps extends TableHeadBodyPublicProps {
76
76
  dragRow?: boolean;
77
77
  /** 拖动行事件 */
78
78
  onDragRow?: (evt: any) => void;
79
+ /** 虚拟滚动 */
80
+ virtual?: boolean;
81
+ /** 虚拟滚动下标 */
82
+ virtualIndex: [number, number];
79
83
  }
@@ -11,6 +11,7 @@ export interface TableElementProps {
11
11
  /** 是否具有固定列 */
12
12
  fixedColumn?: boolean;
13
13
  children?: any;
14
+ cRef?: any;
14
15
  [name: string]: any;
15
16
  }
16
17
  export declare const TableElement: FunctionComponent<TableElementProps>;