@para-ui/core 3.0.1 → 3.0.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +180 -68
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/index.js +4 -3
- package/Breadcrumbs/index.js +10 -7
- package/Button/index.js +15 -14
- package/ButtonGroup/index.js +3 -2
- package/Carousel/index.js +7 -5
- package/Cascader/index.d.ts +3 -1
- package/Cascader/index.js +13 -5
- package/Checkbox/index.js +27 -8
- package/CheckboxGroup/index.d.ts +2 -5
- package/CheckboxGroup/index.js +13 -10
- package/Collapse/index.js +11 -10
- package/CollapseBox/index.js +7 -6
- package/ComboSelect/index.js +161 -67
- package/ComboSelect/interface.d.ts +10 -9
- package/Container/index.js +24 -23
- package/DatePicker/index.js +12 -17
- package/DatePicker/util.d.ts +0 -1
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +10 -9
- package/Dropdown/index.js +59 -6
- package/Empty/index.js +7 -6
- package/Form/index.js +6 -5
- package/FormItem/compoments/formFile/index.d.ts +16 -16
- package/FormItem/index.d.ts +19 -19
- package/FormItem/index.js +3 -2
- package/FunctionModal/index.js +3 -2
- package/GlobalContext/constant.d.ts +8 -0
- package/Help/index.js +3 -2
- package/HelperText/index.d.ts +9 -5
- package/HelperText/index.js +9 -4
- package/InputLang/index.d.ts +2 -5
- package/InputLang/index.js +13 -7
- package/InputNumber/index.d.ts +2 -5
- package/InputNumber/index.js +15 -12
- package/Label/index.d.ts +2 -0
- package/Label/index.js +12 -8
- package/Loading/index.js +5 -4
- package/Menu/index.js +18 -17
- package/Message/index.js +5 -4
- package/Modal/index.js +28 -26
- package/MultiBox/index.d.ts +2 -5
- package/MultiBox/index.js +13 -6
- package/Notification/index.js +3 -2
- package/OperateBtn/index.js +15 -12
- package/PageHeader/index.js +18 -18
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +3 -2
- package/Popover/index.js +7 -4
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +13 -9
- package/Querying/index.js +6 -5
- package/README.md +15 -0
- package/Radio/index.js +22 -8
- package/RadioGroup/index.d.ts +2 -5
- package/RadioGroup/index.js +10 -7
- package/Search/index.js +13 -8
- package/Select/index.d.ts +2 -5
- package/Select/index.js +23 -20
- package/SelectInput/index.js +3 -2
- package/Selector/index.js +63 -51
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +2 -5
- package/SelectorPicker/index.js +20 -17
- package/SingleBox/index.d.ts +2 -5
- package/SingleBox/index.js +11 -6
- package/Slider/index.d.ts +4 -4
- package/Slider/index.js +9 -4
- package/Split/index.js +8 -7
- package/Stepper/index.js +7 -3
- package/Switch/index.js +10 -12
- package/Table/index.js +522 -296
- package/Table/interface.d.ts +43 -1
- package/Table/tableElement/index.d.ts +2 -2
- package/Table/util.d.ts +13 -1
- package/Tabs/index.js +7 -6
- package/Tag/index.js +12 -14
- package/TextField/index.d.ts +2 -5
- package/TextField/index.js +20 -18
- package/TimePicker/index.js +1 -0
- package/Timeline/index.js +13 -12
- package/Title/index.d.ts +30 -0
- package/Title/index.js +49 -0
- package/ToggleButton/index.js +13 -13
- package/Tooltip/index.js +13 -9
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +8 -4
- package/Tree/index.js +3 -2
- package/Tree/utils/tools.d.ts +0 -1
- package/Upload/ImgCrop/constants.d.ts +1 -1
- package/Upload/index.js +50 -43
- package/_verture/constant-bf34e6fa.js +11 -0
- package/_verture/{index-abfdd262.js → index-08b7101b.js} +63 -31
- package/_verture/{index-5bb4b5d7.js → index-df70784b.js} +30 -17
- package/_verture/{modalContext-59669f93.js → modalContext-7b378e49.js} +0 -0
- package/index.d.ts +2 -0
- package/index.js +7 -5
- package/package.json +2 -1
package/Table/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { r as regenerator } from '../_verture/index-342379c6.js';
|
|
|
5
5
|
import { _ as __rest, a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { useState, useEffect, useMemo, useCallback, Fragment as Fragment$1, useRef } from 'react';
|
|
8
|
-
import { Get, Post, DeepClone, ArrayToObject, Cancel } from '@paraview/lib';
|
|
8
|
+
import { Get, Post, DeepClone, GetBrowserClass, ArrayToObject, Cancel } from '@paraview/lib';
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
import { Popover } from '../Popover/index.js';
|
|
11
11
|
import { Checkbox } from '../Checkbox/index.js';
|
|
@@ -16,6 +16,7 @@ import SolidArrowUp from '@para-ui/icons/UpTriangleF';
|
|
|
16
16
|
import SolidArrowDown from '@para-ui/icons/DownTriangleF';
|
|
17
17
|
import Panel from '@para-ui/icons/Panel';
|
|
18
18
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
19
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
19
20
|
import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
|
|
20
21
|
import { Radio } from '../Radio/index.js';
|
|
21
22
|
import Empty from '../Empty/index.js';
|
|
@@ -23,6 +24,7 @@ import OperateBtn from '../OperateBtn/index.js';
|
|
|
23
24
|
import Down from '@para-ui/icons/Down';
|
|
24
25
|
import { Pagination } from '../Pagination/index.js';
|
|
25
26
|
import { Loading } from '../Loading/index.js';
|
|
27
|
+
import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
|
|
26
28
|
import '../Tooltip/index.js';
|
|
27
29
|
import 'rc-tooltip';
|
|
28
30
|
import 'rc-tooltip/lib/placements';
|
|
@@ -35,7 +37,6 @@ import '@para-ui/icons/Forbid';
|
|
|
35
37
|
import '../Dropdown/index.js';
|
|
36
38
|
import 'rc-dropdown';
|
|
37
39
|
import '@para-ui/core/GlobalContext';
|
|
38
|
-
import '../_verture/useGlobalProps-af9a2af6.js';
|
|
39
40
|
import '@para-ui/icons/More';
|
|
40
41
|
import 'rc-pagination';
|
|
41
42
|
import '@para-ui/icons/DoubleLeft';
|
|
@@ -124,8 +125,55 @@ var getStringInNumber = function getStringInNumber(str) {
|
|
|
124
125
|
var strHand = str.replace(/[^0-9$]/ig, '');
|
|
125
126
|
return Number(strHand);
|
|
126
127
|
};
|
|
128
|
+
/**
|
|
129
|
+
* 获取选择列localStorage
|
|
130
|
+
* @param key {string} 键值
|
|
131
|
+
* @param num {number} 过期天数
|
|
132
|
+
* */
|
|
133
|
+
|
|
134
|
+
var getLocalStorageSelectHead = function getLocalStorageSelectHead(key, num) {
|
|
135
|
+
//debugger
|
|
136
|
+
var headJsonStr = window.localStorage.getItem('_paraui_table_head') || '{}';
|
|
137
|
+
var headJson = JSON.parse(headJsonStr);
|
|
138
|
+
var headJsonArr = Object.keys(headJson);
|
|
139
|
+
|
|
140
|
+
for (var i = 0, l = headJsonArr.length; i < l; i++) {
|
|
141
|
+
var keyStr = headJsonArr[i];
|
|
142
|
+
var item = headJson[i];
|
|
143
|
+
if (!item) continue;
|
|
144
|
+
var newDate = new Date().getTime(); // 当前时间
|
|
145
|
+
|
|
146
|
+
var endTime = item.storageTime + item.validity; // 过期时间
|
|
147
|
+
// 过期时间 小于 当前时间, 说明已经过期了, 删除当前表格列数据
|
|
148
|
+
|
|
149
|
+
if (endTime < newDate) {
|
|
150
|
+
delete headJson[keyStr];
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
var headJsonItem = headJson[key]; // 重置过期时间
|
|
155
|
+
|
|
156
|
+
if (headJsonItem) {
|
|
157
|
+
headJsonItem.storageTime = new Date().getTime();
|
|
158
|
+
headJsonItem.validity = num * (60 * 60 * 24);
|
|
159
|
+
}
|
|
127
160
|
|
|
128
|
-
|
|
161
|
+
return headJsonItem || {};
|
|
162
|
+
};
|
|
163
|
+
/**
|
|
164
|
+
* 设置选择列localStorage
|
|
165
|
+
* @param key {string} 键值
|
|
166
|
+
* @param val {HeadLocalStorageItem} 保存值
|
|
167
|
+
* */
|
|
168
|
+
|
|
169
|
+
var setLocalStorageSelectHead = function setLocalStorageSelectHead(key, val) {
|
|
170
|
+
var headJsonStr = window.localStorage.getItem('_paraui_table_head') || '{}';
|
|
171
|
+
var headJson = JSON.parse(headJsonStr);
|
|
172
|
+
headJson[key] = val;
|
|
173
|
+
window.localStorage.setItem('_paraui_table_head', JSON.stringify(headJson));
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
var css_248z$7 = ".table-head-element {\n display: table-header-group;\n}";
|
|
129
177
|
styleInject(css_248z$7);
|
|
130
178
|
|
|
131
179
|
var TableHeadElement = function TableHeadElement(props) {
|
|
@@ -135,7 +183,7 @@ var TableHeadElement = function TableHeadElement(props) {
|
|
|
135
183
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
136
184
|
|
|
137
185
|
var handClass = function handClass() {
|
|
138
|
-
var str = '
|
|
186
|
+
var str = 'table-head-element';
|
|
139
187
|
if (className) str += ' ' + className;
|
|
140
188
|
return str;
|
|
141
189
|
};
|
|
@@ -148,7 +196,7 @@ var TableHeadElement = function TableHeadElement(props) {
|
|
|
148
196
|
}));
|
|
149
197
|
};
|
|
150
198
|
|
|
151
|
-
var css_248z$6 = ".
|
|
199
|
+
var css_248z$6 = ".tr-element {\n display: table-row;\n outline: 0;\n vertical-align: middle;\n}";
|
|
152
200
|
styleInject(css_248z$6);
|
|
153
201
|
|
|
154
202
|
var TrElement = function TrElement(props) {
|
|
@@ -158,7 +206,7 @@ var TrElement = function TrElement(props) {
|
|
|
158
206
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
159
207
|
|
|
160
208
|
var handClass = function handClass() {
|
|
161
|
-
var str = '
|
|
209
|
+
var str = 'tr-element';
|
|
162
210
|
if (className) str += ' ' + className;
|
|
163
211
|
return str;
|
|
164
212
|
};
|
|
@@ -171,7 +219,7 @@ var TrElement = function TrElement(props) {
|
|
|
171
219
|
}));
|
|
172
220
|
};
|
|
173
221
|
|
|
174
|
-
var css_248z$5 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.
|
|
222
|
+
var css_248z$5 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.th-element {\n letter-spacing: 0.01071em;\n line-height: 1.43;\n padding: 0;\n font-weight: 700;\n font-size: 14px;\n background-color: rgb(248, 249, 251);\n border-bottom: 1px solid rgba(171, 176, 185, 0.12);\n height: 100%;\n}\n.th-element:first-child {\n border-top-left-radius: 4px;\n}\n.th-element:last-child {\n border-top-right-radius: 4px;\n}\n.th-element:hover {\n background-color: rgb(237, 241, 249);\n}\n.th-element.table-operate.table-operate-small {\n width: 112px;\n}\n.th-element.table-operate.table-operate-small > .table-header-box {\n width: 112px;\n}";
|
|
175
223
|
styleInject(css_248z$5);
|
|
176
224
|
|
|
177
225
|
var ThElement = function ThElement(props) {
|
|
@@ -181,7 +229,7 @@ var ThElement = function ThElement(props) {
|
|
|
181
229
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
182
230
|
|
|
183
231
|
var handClass = function handClass() {
|
|
184
|
-
var str = '
|
|
232
|
+
var str = 'th-element';
|
|
185
233
|
if (className) str += ' ' + className;
|
|
186
234
|
return str;
|
|
187
235
|
};
|
|
@@ -235,6 +283,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
235
283
|
operate = props.operate,
|
|
236
284
|
showColumns = props.showColumns,
|
|
237
285
|
fixedTable = props.fixedTable,
|
|
286
|
+
fixedColumn = props.fixedColumn,
|
|
238
287
|
posFixed = props.posFixed,
|
|
239
288
|
beyondText = props.beyondText;
|
|
240
289
|
|
|
@@ -490,10 +539,14 @@ var TableHead$1 = function TableHead(props) {
|
|
|
490
539
|
var TableCheckMemo = useMemo(function () {
|
|
491
540
|
if (check) {
|
|
492
541
|
var handCls = function handCls() {
|
|
493
|
-
var str = 'table-checkbox table-head-btn
|
|
542
|
+
var str = 'table-checkbox table-head-btn';
|
|
494
543
|
|
|
495
|
-
if (
|
|
496
|
-
str += '
|
|
544
|
+
if (fixedColumn) {
|
|
545
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,且没有单选,没有嵌套表格
|
|
546
|
+
|
|
547
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol) && !radio && !expandable) {
|
|
548
|
+
str += ' table-fixed-dom-left-last';
|
|
549
|
+
}
|
|
497
550
|
}
|
|
498
551
|
|
|
499
552
|
return str;
|
|
@@ -514,45 +567,61 @@ var TableHead$1 = function TableHead(props) {
|
|
|
514
567
|
}))
|
|
515
568
|
}));
|
|
516
569
|
}
|
|
517
|
-
}, [check, indeterminate, checked, selectAll, posFixed, radio, expandable]); // 单选框memo
|
|
570
|
+
}, [check, indeterminate, checked, selectAll, posFixed, radio, expandable, fixedColumn]); // 单选框memo
|
|
518
571
|
|
|
519
572
|
var TableRadioMemo = useMemo(function () {
|
|
520
573
|
if (radio) {
|
|
521
574
|
var handCls = function handCls() {
|
|
522
|
-
var str = 'table-radio table-head-btn
|
|
575
|
+
var str = 'table-radio table-head-btn';
|
|
576
|
+
|
|
577
|
+
if (fixedColumn) {
|
|
578
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,没有嵌套表格
|
|
523
579
|
|
|
524
|
-
|
|
525
|
-
|
|
580
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol) && !expandable) {
|
|
581
|
+
str += ' table-fixed-dom-left-last';
|
|
582
|
+
}
|
|
526
583
|
}
|
|
527
584
|
|
|
528
585
|
return str;
|
|
529
586
|
};
|
|
530
587
|
|
|
531
|
-
return jsx(ThElement, {
|
|
588
|
+
return jsx(ThElement, Object.assign({
|
|
532
589
|
align: "center",
|
|
533
590
|
className: handCls()
|
|
534
|
-
}
|
|
591
|
+
}, {
|
|
592
|
+
children: jsx("div", {
|
|
593
|
+
className: 'table-header-box'
|
|
594
|
+
})
|
|
595
|
+
}));
|
|
535
596
|
}
|
|
536
|
-
}, [radio, posFixed, expandable]); // 嵌套表格memo
|
|
597
|
+
}, [radio, posFixed, expandable, fixedColumn]); // 嵌套表格memo
|
|
537
598
|
|
|
538
599
|
var TableExpandableMemo = useMemo(function () {
|
|
539
600
|
if (expandable) {
|
|
540
601
|
var handCls = function handCls() {
|
|
541
|
-
var str = 'table-expandable table-head-btn
|
|
602
|
+
var str = 'table-expandable table-head-btn';
|
|
542
603
|
|
|
543
|
-
if (
|
|
544
|
-
str += '
|
|
604
|
+
if (fixedColumn) {
|
|
605
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,没有嵌套表格
|
|
606
|
+
|
|
607
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol)) {
|
|
608
|
+
str += ' table-fixed-dom-left-last';
|
|
609
|
+
}
|
|
545
610
|
}
|
|
546
611
|
|
|
547
612
|
return str;
|
|
548
613
|
};
|
|
549
614
|
|
|
550
|
-
return jsx(ThElement, {
|
|
615
|
+
return jsx(ThElement, Object.assign({
|
|
551
616
|
align: "center",
|
|
552
617
|
className: handCls()
|
|
553
|
-
}
|
|
618
|
+
}, {
|
|
619
|
+
children: jsx("div", {
|
|
620
|
+
className: 'table-header-box'
|
|
621
|
+
})
|
|
622
|
+
}));
|
|
554
623
|
}
|
|
555
|
-
}, [expandable, posFixed]); // 过滤弹窗内容
|
|
624
|
+
}, [expandable, posFixed, fixedColumn]); // 过滤弹窗内容
|
|
556
625
|
|
|
557
626
|
var filterPopoverContent = function filterPopoverContent() {
|
|
558
627
|
return jsxs("div", Object.assign({
|
|
@@ -616,16 +685,16 @@ var TableHead$1 = function TableHead(props) {
|
|
|
616
685
|
var handCls = function handCls(item) {
|
|
617
686
|
var str = '';
|
|
618
687
|
|
|
619
|
-
if (item.fixed) {
|
|
620
|
-
str = '
|
|
688
|
+
if (fixedColumn && item.fixed) {
|
|
689
|
+
str = 'table-fixed-dom-' + item.fixed; // 固定左边,判断是否是最后一个
|
|
621
690
|
|
|
622
691
|
if (item.fixed === 'left' && item.paraui_fixed_left_last) {
|
|
623
|
-
str += '
|
|
692
|
+
str += ' table-fixed-dom-left-last';
|
|
624
693
|
} // 固定右边,判断是否是第一个
|
|
625
694
|
|
|
626
695
|
|
|
627
696
|
if (item.fixed === 'right' && item.paraui_fixed_right_first) {
|
|
628
|
-
str += '
|
|
697
|
+
str += ' table-fixed-dom-right-first';
|
|
629
698
|
}
|
|
630
699
|
}
|
|
631
700
|
|
|
@@ -637,7 +706,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
637
706
|
width: item.width
|
|
638
707
|
};
|
|
639
708
|
|
|
640
|
-
if (item.fixed && item.width) {
|
|
709
|
+
if (fixedColumn && item.fixed && item.width) {
|
|
641
710
|
if (item.fixed === 'left') {
|
|
642
711
|
json.left = item.paraui_left_width + 'px';
|
|
643
712
|
}
|
|
@@ -657,13 +726,15 @@ var TableHead$1 = function TableHead(props) {
|
|
|
657
726
|
visible: filterHead.name === item.name,
|
|
658
727
|
content: filterPopoverContent(),
|
|
659
728
|
onVisibleChange: clickHideFilter,
|
|
660
|
-
overlayClassName:
|
|
729
|
+
overlayClassName: "".concat($prefixCls, "-filter-popover ").concat($prefixCls, "-scrollbar-small")
|
|
661
730
|
}, {
|
|
662
|
-
children: jsx("
|
|
731
|
+
children: jsx("div", Object.assign({
|
|
663
732
|
className: handFilterClass(item),
|
|
664
733
|
onClick: clickShowFilter(item)
|
|
665
734
|
}, {
|
|
666
|
-
children: jsx(
|
|
735
|
+
children: jsx("span", {
|
|
736
|
+
children: jsx(Screen, {})
|
|
737
|
+
})
|
|
667
738
|
}))
|
|
668
739
|
}));
|
|
669
740
|
};
|
|
@@ -677,11 +748,10 @@ var TableHead$1 = function TableHead(props) {
|
|
|
677
748
|
children: jsxs("div", Object.assign({
|
|
678
749
|
className: handCellClass(headCell)
|
|
679
750
|
}, {
|
|
680
|
-
children: [
|
|
681
|
-
className: "table-header-title"
|
|
682
|
-
onClick: createSortHandler(headCell.name, headCell)
|
|
751
|
+
children: [jsx("div", Object.assign({
|
|
752
|
+
className: "table-header-title"
|
|
683
753
|
}, {
|
|
684
|
-
children:
|
|
754
|
+
children: jsx("span", Object.assign({
|
|
685
755
|
className: "table-header-title-label"
|
|
686
756
|
}, {
|
|
687
757
|
children: jsx(AutoTips, Object.assign({
|
|
@@ -689,29 +759,37 @@ var TableHead$1 = function TableHead(props) {
|
|
|
689
759
|
}, {
|
|
690
760
|
children: headCell.label
|
|
691
761
|
}))
|
|
692
|
-
}))
|
|
693
|
-
|
|
762
|
+
}))
|
|
763
|
+
})), filter && headCell.name && headCell.filter && handFilterPopover(headCell), sortTable && headCell.name && headCell.sort !== false && jsx("div", Object.assign({
|
|
764
|
+
className: "table-sort-svg"
|
|
765
|
+
}, {
|
|
766
|
+
children: jsxs("span", Object.assign({
|
|
767
|
+
onClick: createSortHandler(headCell.name, headCell)
|
|
694
768
|
}, {
|
|
695
769
|
children: [jsx(SolidArrowUp, {
|
|
696
770
|
className: "up-svg"
|
|
697
771
|
}), jsx(SolidArrowDown, {
|
|
698
772
|
className: "down-svg"
|
|
699
773
|
})]
|
|
700
|
-
}))
|
|
701
|
-
}))
|
|
774
|
+
}))
|
|
775
|
+
}))]
|
|
702
776
|
}))
|
|
703
777
|
}), headCell.name || index);
|
|
704
778
|
});
|
|
705
|
-
}, [headData, sortTable, filter, orderFieldArr, orderTypeArr, align, filterHead, selectFilterCom, beyondText, selectFilter]); // 操作栏memo
|
|
779
|
+
}, [headData, sortTable, filter, orderFieldArr, orderTypeArr, align, filterHead, selectFilterCom, beyondText, selectFilter, fixedColumn]); // 操作栏memo
|
|
706
780
|
|
|
707
781
|
var TableOperateMemo = useMemo(function () {
|
|
708
782
|
if (operate) {
|
|
709
783
|
var handCls = function handCls() {
|
|
710
|
-
var str = 'table-operate
|
|
784
|
+
var str = 'table-operate';
|
|
711
785
|
if (operate.operateBtnRender) str += ' table-operate-small';
|
|
712
786
|
|
|
713
|
-
if (
|
|
714
|
-
str += '
|
|
787
|
+
if (fixedColumn) {
|
|
788
|
+
str += ' table-fixed-dom-right'; // 存在显示列,且没有右侧固定列
|
|
789
|
+
|
|
790
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.rightBol)) {
|
|
791
|
+
str += ' table-fixed-dom-right-first';
|
|
792
|
+
}
|
|
715
793
|
}
|
|
716
794
|
|
|
717
795
|
return str;
|
|
@@ -719,9 +797,13 @@ var TableHead$1 = function TableHead(props) {
|
|
|
719
797
|
|
|
720
798
|
var handStyle = function handStyle() {
|
|
721
799
|
var json = {
|
|
722
|
-
width: operate.width
|
|
723
|
-
right: showColumns === "inside" ? '56px' : '0px'
|
|
800
|
+
width: operate.width
|
|
724
801
|
};
|
|
802
|
+
|
|
803
|
+
if (fixedColumn) {
|
|
804
|
+
json.right = showColumns === "inside" ? '56px' : '0px';
|
|
805
|
+
}
|
|
806
|
+
|
|
725
807
|
return Object.assign(Object.assign({}, json), operate.style);
|
|
726
808
|
};
|
|
727
809
|
|
|
@@ -749,7 +831,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
749
831
|
}))
|
|
750
832
|
}));
|
|
751
833
|
}
|
|
752
|
-
}, [operate, align, posFixed, showColumns, posFixed, beyondText]); // 显示列弹窗内容
|
|
834
|
+
}, [operate, align, posFixed, showColumns, posFixed, beyondText, fixedColumn]); // 显示列弹窗内容
|
|
753
835
|
|
|
754
836
|
var showListContent = function showListContent() {
|
|
755
837
|
return jsxs("div", Object.assign({
|
|
@@ -791,10 +873,10 @@ var TableHead$1 = function TableHead(props) {
|
|
|
791
873
|
|
|
792
874
|
var TableShowList = useMemo(function () {
|
|
793
875
|
var handCls = function handCls() {
|
|
794
|
-
var str = 'show-colums
|
|
876
|
+
var str = 'show-colums table-fixed-dom-right'; // 没有固定列参数 或者 没有操作栏且没有右侧固定列
|
|
795
877
|
|
|
796
|
-
if (!operate && !(posFixed === null || posFixed === void 0 ? void 0 : posFixed.rightBol)) {
|
|
797
|
-
str += '
|
|
878
|
+
if (!fixedColumn || !operate && !(posFixed === null || posFixed === void 0 ? void 0 : posFixed.rightBol)) {
|
|
879
|
+
str += ' table-fixed-dom-right-first';
|
|
798
880
|
}
|
|
799
881
|
|
|
800
882
|
return str;
|
|
@@ -805,7 +887,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
805
887
|
visible: Boolean(anchorElColums),
|
|
806
888
|
content: showListContent(),
|
|
807
889
|
onVisibleChange: clickHideColums,
|
|
808
|
-
overlayClassName:
|
|
890
|
+
overlayClassName: "".concat($prefixCls, "-table-show-colums-popover ").concat($prefixCls, "-scrollbar-small")
|
|
809
891
|
}, {
|
|
810
892
|
children: jsx(ThElement, Object.assign({
|
|
811
893
|
align: "center",
|
|
@@ -824,7 +906,8 @@ var TableHead$1 = function TableHead(props) {
|
|
|
824
906
|
var handClass = function handClass() {
|
|
825
907
|
var str = 'table-head';
|
|
826
908
|
if (showColumns === 'inside') str += ' table-head-inside';
|
|
827
|
-
if (!fixedTable) str += ' table-head-scroll'; //
|
|
909
|
+
if (!fixedTable) str += ' table-head-scroll'; // 防止长度过长
|
|
910
|
+
// 没有 复选框,单选框,展开 按钮
|
|
828
911
|
|
|
829
912
|
if (!check && !radio && !expandable) str += ' table-head-no-btn';
|
|
830
913
|
return str;
|
|
@@ -839,7 +922,7 @@ var TableHead$1 = function TableHead(props) {
|
|
|
839
922
|
}));
|
|
840
923
|
};
|
|
841
924
|
|
|
842
|
-
var css_248z$4 = ".
|
|
925
|
+
var css_248z$4 = ".table-body-element {\n display: table-row-group;\n}";
|
|
843
926
|
styleInject(css_248z$4);
|
|
844
927
|
|
|
845
928
|
var TableBodyElement = function TableBodyElement(props) {
|
|
@@ -849,7 +932,7 @@ var TableBodyElement = function TableBodyElement(props) {
|
|
|
849
932
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
850
933
|
|
|
851
934
|
var handClass = function handClass() {
|
|
852
|
-
var str = '
|
|
935
|
+
var str = 'table-body-element';
|
|
853
936
|
if (className) str += ' ' + className;
|
|
854
937
|
return str;
|
|
855
938
|
};
|
|
@@ -862,7 +945,7 @@ var TableBodyElement = function TableBodyElement(props) {
|
|
|
862
945
|
}));
|
|
863
946
|
};
|
|
864
947
|
|
|
865
|
-
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.
|
|
948
|
+
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.td-element {\n letter-spacing: 0.01071em;\n padding: 0 8px;\n fontWeight: 400;\n font-size: 14px;\n white-space: nowrap;\n border: 0;\n line-height: 1.43;\n}\n.td-element.table-operate {\n /* position: sticky;\n right: 0;*/\n}";
|
|
866
949
|
styleInject(css_248z$3);
|
|
867
950
|
|
|
868
951
|
var TdElement = function TdElement(props) {
|
|
@@ -872,7 +955,7 @@ var TdElement = function TdElement(props) {
|
|
|
872
955
|
otherProps = __rest(props, ["className", "style", "children"]);
|
|
873
956
|
|
|
874
957
|
var handClass = function handClass() {
|
|
875
|
-
var str = '
|
|
958
|
+
var str = 'td-element';
|
|
876
959
|
if (className) str += ' ' + className;
|
|
877
960
|
return str;
|
|
878
961
|
};
|
|
@@ -910,6 +993,7 @@ var TableBody = function TableBody(props) {
|
|
|
910
993
|
operate = props.operate,
|
|
911
994
|
showColumns = props.showColumns,
|
|
912
995
|
fixedTable = props.fixedTable,
|
|
996
|
+
fixedColumn = props.fixedColumn,
|
|
913
997
|
formatter = props.formatter,
|
|
914
998
|
_props$orderFieldArr = props.orderFieldArr,
|
|
915
999
|
orderFieldArr = _props$orderFieldArr === void 0 ? [] : _props$orderFieldArr,
|
|
@@ -1152,10 +1236,14 @@ var TableBody = function TableBody(props) {
|
|
|
1152
1236
|
}
|
|
1153
1237
|
|
|
1154
1238
|
var handCls = function handCls() {
|
|
1155
|
-
var str = 'table-checkbox table-body-btn
|
|
1239
|
+
var str = 'table-checkbox table-body-btn';
|
|
1240
|
+
|
|
1241
|
+
if (fixedColumn) {
|
|
1242
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,且没有单选,没有嵌套表格
|
|
1156
1243
|
|
|
1157
|
-
|
|
1158
|
-
|
|
1244
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol) && !radio && !expandable) {
|
|
1245
|
+
str += ' table-fixed-dom-left-last';
|
|
1246
|
+
}
|
|
1159
1247
|
}
|
|
1160
1248
|
|
|
1161
1249
|
return str;
|
|
@@ -1174,7 +1262,7 @@ var TableBody = function TableBody(props) {
|
|
|
1174
1262
|
})
|
|
1175
1263
|
}));
|
|
1176
1264
|
}
|
|
1177
|
-
}, [check, disabledJson, rowKey, checkJson, selectCheck, disabledArrStatus, posFixed, expandable, radio]); // 单选框useCallback
|
|
1265
|
+
}, [check, disabledJson, rowKey, checkJson, selectCheck, disabledArrStatus, posFixed, expandable, radio, fixedColumn]); // 单选框useCallback
|
|
1178
1266
|
|
|
1179
1267
|
var TableRadioCallback = useCallback(function (row) {
|
|
1180
1268
|
if (radio) {
|
|
@@ -1201,10 +1289,14 @@ var TableBody = function TableBody(props) {
|
|
|
1201
1289
|
}
|
|
1202
1290
|
|
|
1203
1291
|
var handCls = function handCls() {
|
|
1204
|
-
var str = 'table-radio table-body-btn
|
|
1292
|
+
var str = 'table-radio table-body-btn';
|
|
1205
1293
|
|
|
1206
|
-
if (
|
|
1207
|
-
str += '
|
|
1294
|
+
if (fixedColumn) {
|
|
1295
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,没有嵌套表格
|
|
1296
|
+
|
|
1297
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol) && !expandable) {
|
|
1298
|
+
str += ' table-fixed-dom-left-last';
|
|
1299
|
+
}
|
|
1208
1300
|
}
|
|
1209
1301
|
|
|
1210
1302
|
return str;
|
|
@@ -1223,7 +1315,7 @@ var TableBody = function TableBody(props) {
|
|
|
1223
1315
|
})
|
|
1224
1316
|
}));
|
|
1225
1317
|
}
|
|
1226
|
-
}, [radio, disabledJson, radioValue, rowKey, selectRadio, disabledArrStatus, expandable, posFixed]); // 嵌套加减useCallback
|
|
1318
|
+
}, [radio, disabledJson, radioValue, rowKey, selectRadio, disabledArrStatus, expandable, posFixed, fixedColumn]); // 嵌套加减useCallback
|
|
1227
1319
|
|
|
1228
1320
|
var TableExpandableMemo = useCallback(function (row) {
|
|
1229
1321
|
if (!expandable) return null;
|
|
@@ -1232,10 +1324,14 @@ var TableBody = function TableBody(props) {
|
|
|
1232
1324
|
if (disabledExpandJson[row[rowKey]] || expandableDemo === false) return jsx(TdElement, {});
|
|
1233
1325
|
|
|
1234
1326
|
var handCls = function handCls() {
|
|
1235
|
-
var str = 'table-expandable table-body-btn
|
|
1327
|
+
var str = 'table-expandable table-body-btn';
|
|
1328
|
+
|
|
1329
|
+
if (fixedColumn) {
|
|
1330
|
+
str += ' table-fixed-dom-left'; // 左边没有定位,没有嵌套表格
|
|
1236
1331
|
|
|
1237
|
-
|
|
1238
|
-
|
|
1332
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.leftBol)) {
|
|
1333
|
+
str += ' table-fixed-dom-left-last';
|
|
1334
|
+
}
|
|
1239
1335
|
}
|
|
1240
1336
|
|
|
1241
1337
|
return str;
|
|
@@ -1250,7 +1346,7 @@ var TableBody = function TableBody(props) {
|
|
|
1250
1346
|
onClick: handClickNestTable(row)
|
|
1251
1347
|
})
|
|
1252
1348
|
}));
|
|
1253
|
-
}, [expandable, expandableRow, rowKey, disabledExpandJson, onExpand]); // 表格一行内容useCallback
|
|
1349
|
+
}, [expandable, expandableRow, rowKey, disabledExpandJson, onExpand, fixedColumn]); // 表格一行内容useCallback
|
|
1254
1350
|
|
|
1255
1351
|
var TableContentUseCallback = useCallback(function (row) {
|
|
1256
1352
|
var params = {
|
|
@@ -1277,16 +1373,16 @@ var TableBody = function TableBody(props) {
|
|
|
1277
1373
|
}
|
|
1278
1374
|
}
|
|
1279
1375
|
|
|
1280
|
-
if (item.fixed) {
|
|
1281
|
-
str = '
|
|
1376
|
+
if (item.fixed && fixedColumn) {
|
|
1377
|
+
str = 'table-fixed-dom-' + item.fixed; // 固定左边,判断是否是最后一个
|
|
1282
1378
|
|
|
1283
1379
|
if (item.fixed === 'left' && item.paraui_fixed_left_last) {
|
|
1284
|
-
str += '
|
|
1380
|
+
str += ' table-fixed-dom-left-last';
|
|
1285
1381
|
} // 固定右边,判断是否是第一个
|
|
1286
1382
|
|
|
1287
1383
|
|
|
1288
1384
|
if (item.fixed === 'right' && item.paraui_fixed_right_first) {
|
|
1289
|
-
str += '
|
|
1385
|
+
str += ' table-fixed-dom-right-first';
|
|
1290
1386
|
}
|
|
1291
1387
|
}
|
|
1292
1388
|
|
|
@@ -1296,7 +1392,7 @@ var TableBody = function TableBody(props) {
|
|
|
1296
1392
|
var handStyle = function handStyle(item) {
|
|
1297
1393
|
var json = {};
|
|
1298
1394
|
|
|
1299
|
-
if (item.fixed && item.width) {
|
|
1395
|
+
if (fixedColumn && item.fixed && item.width) {
|
|
1300
1396
|
if (item.fixed === 'left') {
|
|
1301
1397
|
json.left = item.paraui_left_width + 'px';
|
|
1302
1398
|
}
|
|
@@ -1312,7 +1408,7 @@ var TableBody = function TableBody(props) {
|
|
|
1312
1408
|
return tableCell ? tableCell(row, params) : headData.map(function (item, index) {
|
|
1313
1409
|
var text = row[item.name];
|
|
1314
1410
|
var colSpan = 1;
|
|
1315
|
-
if (item.render) text = item.render(row);
|
|
1411
|
+
if (item.render) text = item.render(row, item, row[item.name], index);
|
|
1316
1412
|
if (formatter) text = formatter(row, item, row[item.name], index); // 存在显示列,最后一列占两格
|
|
1317
1413
|
|
|
1318
1414
|
if (showColumns === 'inside' && !operate && index === headData.length - 1) {
|
|
@@ -1332,7 +1428,7 @@ var TableBody = function TableBody(props) {
|
|
|
1332
1428
|
}))
|
|
1333
1429
|
}), item.name || index);
|
|
1334
1430
|
});
|
|
1335
|
-
}, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText]); // 操作栏useCallback
|
|
1431
|
+
}, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText, fixedColumn]); // 操作栏useCallback
|
|
1336
1432
|
|
|
1337
1433
|
var TableOperateUseCallback = useCallback(function (row) {
|
|
1338
1434
|
if (operate) {
|
|
@@ -1356,10 +1452,14 @@ var TableBody = function TableBody(props) {
|
|
|
1356
1452
|
};
|
|
1357
1453
|
|
|
1358
1454
|
var handCls = function handCls() {
|
|
1359
|
-
var str = 'table-operate
|
|
1455
|
+
var str = 'table-operate';
|
|
1360
1456
|
|
|
1361
|
-
if (
|
|
1362
|
-
str += '
|
|
1457
|
+
if (fixedColumn) {
|
|
1458
|
+
str += ' table-fixed-dom-right';
|
|
1459
|
+
|
|
1460
|
+
if (!(posFixed === null || posFixed === void 0 ? void 0 : posFixed.rightBol)) {
|
|
1461
|
+
str += ' table-fixed-dom-right-first';
|
|
1462
|
+
}
|
|
1363
1463
|
}
|
|
1364
1464
|
|
|
1365
1465
|
return str;
|
|
@@ -1374,7 +1474,7 @@ var TableBody = function TableBody(props) {
|
|
|
1374
1474
|
children: handOperate()
|
|
1375
1475
|
}));
|
|
1376
1476
|
}
|
|
1377
|
-
}, [operate, align, showColumns, posFixed]); // 嵌套表格useCallback
|
|
1477
|
+
}, [operate, align, showColumns, posFixed, fixedColumn]); // 嵌套表格useCallback
|
|
1378
1478
|
|
|
1379
1479
|
var TableExpandableContentUseCallback = useCallback(function (row) {
|
|
1380
1480
|
var id = row[rowKey];
|
|
@@ -1468,7 +1568,7 @@ var TableHead = function TableHead(props) {
|
|
|
1468
1568
|
};
|
|
1469
1569
|
|
|
1470
1570
|
return jsx("div", Object.assign({
|
|
1471
|
-
className: 'table-pagination
|
|
1571
|
+
className: 'table-pagination'
|
|
1472
1572
|
}, {
|
|
1473
1573
|
children: jsx(Pagination, {
|
|
1474
1574
|
type: paginationType,
|
|
@@ -1483,7 +1583,7 @@ var TableHead = function TableHead(props) {
|
|
|
1483
1583
|
}));
|
|
1484
1584
|
};
|
|
1485
1585
|
|
|
1486
|
-
var css_248z$2 = ".
|
|
1586
|
+
var css_248z$2 = ".table-container {\n overflow-x: auto;\n}";
|
|
1487
1587
|
styleInject(css_248z$2);
|
|
1488
1588
|
|
|
1489
1589
|
var TableContainer = function TableContainer(props) {
|
|
@@ -1494,7 +1594,7 @@ var TableContainer = function TableContainer(props) {
|
|
|
1494
1594
|
otherProps = __rest(props, ["cRef", "className", "style", "children"]);
|
|
1495
1595
|
|
|
1496
1596
|
var handClass = function handClass() {
|
|
1497
|
-
var str = '
|
|
1597
|
+
var str = 'table-container';
|
|
1498
1598
|
if (className) str += ' ' + className;
|
|
1499
1599
|
return str;
|
|
1500
1600
|
};
|
|
@@ -1508,19 +1608,19 @@ var TableContainer = function TableContainer(props) {
|
|
|
1508
1608
|
}));
|
|
1509
1609
|
};
|
|
1510
1610
|
|
|
1511
|
-
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.
|
|
1611
|
+
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.table-element {\n width: 100%;\n display: table;\n border-collapse: separate;\n border-spacing: 0;\n}\n.table-element.table-element-fixed-column > .table-body-element > .tr-element > .td-element {\n position: sticky;\n}\n.table-element > .table-head-element > .tr-element > .th-element {\n position: sticky;\n top: 0;\n z-index: 10;\n}\n.table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n height: 100%;\n width: 30px;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(100%);\n content: \"\";\n transition: box-shadow 0.3s;\n pointer-events: none;\n}\n.table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n height: 100%;\n width: 30px;\n position: absolute;\n top: 0;\n left: 0;\n transform: translate(-100%);\n content: \"\";\n transition: box-shadow 0.3s;\n pointer-events: none;\n}\n.table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-left {\n z-index: 11;\n}\n.table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-right {\n z-index: 11;\n}\n.table-element > .table-body-element > .tr-element > .td-element {\n z-index: 1;\n}\n.table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n height: 100%;\n width: 30px;\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(100%);\n content: \"\";\n transition: box-shadow 0.3s;\n pointer-events: none;\n}\n.table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n height: 100%;\n width: 30px;\n position: absolute;\n top: 0;\n left: 0;\n transform: translate(-100%);\n content: \"\";\n transition: box-shadow 0.3s;\n pointer-events: none;\n}\n.table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-left {\n z-index: 2;\n}\n.table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-right {\n z-index: 2;\n}\n\n.table-scroll-left .table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n box-shadow: inset -10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n.table-scroll-left .table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n box-shadow: inset -10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n\n.table-scroll-right .table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n box-shadow: inset 10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n.table-scroll-right .table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n box-shadow: inset 10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n\n.table-scroll-middle .table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n box-shadow: inset 10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n.table-scroll-middle .table-element > .table-head-element > .tr-element > .th-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n box-shadow: inset -10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n.table-scroll-middle .table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-left.table-fixed-dom-left-last::after {\n box-shadow: inset 10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}\n.table-scroll-middle .table-element > .table-body-element > .tr-element > .td-element.table-fixed-dom-right.table-fixed-dom-right-first::after {\n box-shadow: inset -10px 0 10px -8px rgba(0, 0, 0, 0.1);\n}";
|
|
1512
1612
|
styleInject(css_248z$1);
|
|
1513
1613
|
|
|
1514
1614
|
var TableElement = function TableElement(props) {
|
|
1515
1615
|
var className = props.className,
|
|
1516
1616
|
style = props.style,
|
|
1517
|
-
|
|
1617
|
+
fixedColumn = props.fixedColumn,
|
|
1518
1618
|
children = props.children,
|
|
1519
|
-
otherProps = __rest(props, ["className", "style", "
|
|
1619
|
+
otherProps = __rest(props, ["className", "style", "fixedColumn", "children"]);
|
|
1520
1620
|
|
|
1521
1621
|
var handClass = function handClass() {
|
|
1522
|
-
var str = '
|
|
1523
|
-
if (
|
|
1622
|
+
var str = 'table-element';
|
|
1623
|
+
if (fixedColumn) str += ' table-element-fixed-column';
|
|
1524
1624
|
if (className) str += ' ' + className;
|
|
1525
1625
|
return str;
|
|
1526
1626
|
};
|
|
@@ -1533,10 +1633,19 @@ var TableElement = function TableElement(props) {
|
|
|
1533
1633
|
}));
|
|
1534
1634
|
};
|
|
1535
1635
|
|
|
1536
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-table {\n width: 100%;\n height: 100%;\n display: inline-block;\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}\n.paraui-table.paraui-table-no-data > .paraui-table-container > table {\n height: 100%;\n}\n.paraui-table.paraui-table-load.paraui-table-no-data > .paraui-table-container > table {\n height: auto;\n}\n.paraui-table.paraui-table-radio.paraui-table-check .table-radio {\n left: 48px;\n}\n.paraui-table.paraui-table-expandable.paraui-table-check .table-expandable {\n left: 48px;\n}\n.paraui-table.paraui-table-expandable.paraui-table-check.paraui-table-radio .table-expandable {\n left: 80px;\n}\n.paraui-table > .table-contain {\n height: 100%;\n position: relative;\n}\n.paraui-table > .table-contain > table {\n height: auto;\n}\n.paraui-table > .table-contain > table .table-checkbox {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-checkbox > label {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table .table-checkbox .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-table > .table-contain > table .table-radio {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-radio > label {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table .table-radio .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-table > .table-contain > table .table-expandable {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-expandable > svg {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table > .table-head {\n width: 100%;\n white-space: nowrap;\n}\n.paraui-table > .table-contain > table > .table-head > tr th {\n height: 50px;\n}\n.paraui-table > .table-contain > table > .table-head.table-head-scroll tr th {\n max-width: 240px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box {\n height: 49px;\n line-height: 49px;\n position: relative;\n padding: 0 8px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title {\n height: 100%;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > span {\n height: 100%;\n display: inline-block;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-header-title-label {\n width: 100%;\n color: rgba(46, 55, 67, 0.7);\n font-weight: 700;\n font-size: 14px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg {\n line-height: 0;\n width: 12px;\n margin-left: 5px;\n white-space: pre-wrap;\n vertical-align: top;\n height: inherit;\n padding-top: 15px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > svg {\n font-size: 12px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > .up-svg {\n position: relative;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > .down-svg {\n position: relative;\n top: -5px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter {\n position: absolute;\n right: 0;\n top: 0;\n cursor: pointer;\n width: 28px;\n text-align: left;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter:hover {\n background-color: rgb(227, 234, 247);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n margin-left: 7px;\n position: relative;\n top: 2px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort {\n cursor: pointer;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort > .table-header-title > .table-header-title-label {\n max-width: calc(100% - 18px);\n width: auto;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-filter > .table-header-title {\n margin-right: 18px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-asc > .table-header-title > .table-sort-svg > .up-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-desc > .table-header-title > .table-sort-svg > .down-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .show-colums {\n width: 56px;\n cursor: pointer;\n border-left: 1px solid rgba(171, 176, 185, 0.12);\n right: 0;\n}\n.paraui-table > .table-contain > table > .table-head .show-colums .table-header-box {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-table > .table-contain > table > .table-head .show-colums .table-header-box > svg {\n font-size: 24px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-head .show-colums .table-header-box:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head.table-head-no-btn tr th:first-child .table-header-box {\n padding-left: 16px;\n}\n.paraui-table > .table-contain > table > .table-head .table-head-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-head .table-head-btn:first-child {\n width: 48px;\n}\n.paraui-table > .table-contain > table > .table-body {\n width: 100%;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-scroll tr td {\n max-width: 240px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-body tr {\n height: 56px;\n}\n.paraui-table > .table-contain > table > .table-body tr td {\n background-color: white;\n}\n.paraui-table > .table-contain > table > .table-body tr:nth-of-type(2n) td {\n background-color: rgb(249, 250, 251);\n}\n.paraui-table > .table-contain > table > .table-body tr:hover td {\n background-color: rgb(237, 241, 249);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > svg {\n transition: all 0.3s;\n cursor: pointer;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > svg:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > .expand {\n transform: rotate(180deg);\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-body .more-table-row {\n cursor: pointer;\n}\n.paraui-table > .table-contain > table > .table-body .more-table-row .more-btn {\n color: rgb(54, 102, 214);\n font-size: 14px;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-no-btn tr td:first-child {\n padding-left: 16px;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-no-btn > .table-no-data > td:first-child {\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-body .table-body-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-body .table-body-btn:first-child {\n width: 48px;\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data {\n height: calc(100% - 50px);\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data:hover td {\n background-color: white;\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data > td {\n padding: 56px 0 0 0;\n}\n.paraui-table > .paraui-table-pagination {\n width: 100%;\n height: 60px;\n padding-right: 10px;\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n}\n.paraui-table.table-pagination > .table-contain {\n height: calc(100% - 60px);\n}\n.paraui-table.table-pagination.table-load-more > .table-contain {\n height: 100%;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content {\n width: 200px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > label .paraui-checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > label .paraui-checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button {\n width: 100%;\n height: 100%;\n border: 0;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}\n\n.paraui-filter-popover > .paraui-popover-content {\n width: 200px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > label .rc-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > label .rc-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button {\n width: 50%;\n height: 100%;\n border: 0;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}";
|
|
1636
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-table {\n width: 100%;\n height: 100%;\n display: inline-block;\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}\n.paraui-v3-table.paraui-v3-table-fixed-table > .table-contain > table {\n table-layout: fixed;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn > .table-contain > table .table-checkbox {\n left: 0;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn > .table-contain > table .table-radio {\n left: 0;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn > .table-contain > table .table-expandable {\n left: 0;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn.paraui-v3-table-radio.paraui-v3-table-check .table-radio {\n left: 48px;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn.paraui-v3-table-expandable.paraui-v3-table-check .table-expandable {\n left: 48px;\n}\n.paraui-v3-table.paraui-v3-table-fixed-cloumn.paraui-v3-table-expandable.paraui-v3-table-check.paraui-v3-table-radio .table-expandable {\n left: 80px;\n}\n.paraui-v3-table.paraui-v3-table-no-data > .table-container > table {\n height: 100%;\n}\n.paraui-v3-table.paraui-v3-table-load.paraui-v3-table-no-data > .table-container > table {\n height: auto;\n}\n.paraui-v3-table > .table-contain {\n height: 100%;\n position: relative;\n}\n.paraui-v3-table > .table-contain > table {\n height: auto;\n}\n.paraui-v3-table > .table-contain > table .table-checkbox > label {\n vertical-align: middle;\n}\n.paraui-v3-table > .table-contain > table .table-checkbox .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v3-table > .table-contain > table .table-radio > label {\n vertical-align: middle;\n}\n.paraui-v3-table > .table-contain > table .table-radio .table-header-box {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v3-table > .table-contain > table .table-expandable > svg {\n vertical-align: middle;\n}\n.paraui-v3-table > .table-contain > table > .table-head {\n width: 100%;\n white-space: nowrap;\n}\n.paraui-v3-table > .table-contain > table > .table-head > tr th {\n height: 50px;\n}\n.paraui-v3-table > .table-contain > table > .table-head.table-head-scroll tr th {\n max-width: 240px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box {\n height: 49px;\n line-height: 49px;\n position: relative;\n padding: 0 8px;\n display: flex;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-title {\n max-width: 100%;\n padding-right: 8px;\n display: flex;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-header-title-label {\n width: 100%;\n color: rgba(46, 55, 67, 0.7);\n font-weight: 700;\n font-size: 14px;\n}\n.paraui-v3-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-v3-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-v3-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover {\n background-color: rgb(227, 234, 247);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > svg {\n font-size: 12px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .up-svg {\n position: relative;\n top: 2px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-sort-svg > span > .down-svg {\n position: relative;\n top: -3px;\n}\n.paraui-v3-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-v3-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-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover {\n background-color: rgb(227, 234, 247);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > span > svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show > span > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > span > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-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(235, 96, 84);\n content: \"\";\n right: 3px;\n top: 2px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort > .table-header-title {\n max-width: calc(100% - 20px);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box.table-header-box-filter > .table-header-title {\n max-width: calc(100% - 20px);\n}\n.paraui-v3-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-v3-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-asc > .table-sort-svg > span > .up-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-desc > .table-sort-svg > span > .down-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head .show-colums {\n width: 56px;\n cursor: pointer;\n border-left: 1px solid rgba(171, 176, 185, 0.12);\n right: 0;\n}\n.paraui-v3-table > .table-contain > table > .table-head .show-colums .table-header-box {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 55px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .show-colums .table-header-box > svg {\n font-size: 24px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-table > .table-contain > table > .table-head .show-colums .table-header-box:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-head.table-head-no-btn tr th:first-child .table-header-box {\n padding-left: 16px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-head-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-head-btn > .table-header-box {\n width: 32px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-head-btn:first-child {\n width: 48px;\n}\n.paraui-v3-table > .table-contain > table > .table-head .table-head-btn:first-child > .table-header-box {\n width: 48px;\n}\n.paraui-v3-table > .table-contain > table > .table-body {\n width: 100%;\n}\n.paraui-v3-table > .table-contain > table > .table-body.table-body-scroll tr td {\n max-width: 240px;\n}\n.paraui-v3-table > .table-contain > table > .table-body tr {\n height: 56px;\n}\n.paraui-v3-table > .table-contain > table > .table-body tr td {\n background-color: white;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-table > .table-contain > table > .table-body tr:nth-of-type(2n) td {\n background-color: rgb(249, 250, 251);\n}\n.paraui-v3-table > .table-contain > table > .table-body tr:hover td {\n background-color: rgb(237, 241, 249);\n}\n.paraui-v3-table > .table-contain > table > .table-body tr .table-expandable > svg {\n transition: all 0.3s;\n cursor: pointer;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-table > .table-contain > table > .table-body tr .table-expandable > svg:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-body tr .table-expandable > .expand {\n transform: rotate(180deg);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table > .table-contain > table > .table-body .more-table-row {\n cursor: pointer;\n}\n.paraui-v3-table > .table-contain > table > .table-body .more-table-row .more-btn {\n color: rgb(54, 102, 214);\n font-size: 14px;\n}\n.paraui-v3-table > .table-contain > table > .table-body.table-body-no-btn tr td:first-child {\n padding-left: 16px;\n}\n.paraui-v3-table > .table-contain > table > .table-body.table-body-no-btn > .table-no-data > td:first-child {\n padding: 0;\n}\n.paraui-v3-table > .table-contain > table > .table-body .table-body-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-v3-table > .table-contain > table > .table-body .table-body-btn:first-child {\n width: 48px;\n}\n.paraui-v3-table > .table-contain > table > .table-body > .table-no-data {\n height: calc(100% - 50px);\n}\n.paraui-v3-table > .table-contain > table > .table-body > .table-no-data:hover td {\n background-color: white;\n}\n.paraui-v3-table > .table-contain > table > .table-body > .table-no-data > td {\n padding: 56px 0 0 0;\n}\n.paraui-v3-table > .table-pagination {\n width: 100%;\n height: 60px;\n padding-right: 10px;\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n}\n.paraui-v3-table.paraui-v3-table-pagination > .table-contain {\n height: calc(100% - 60px);\n}\n.paraui-v3-table.paraui-v3-table-pagination.table-load-more > .table-contain {\n height: 100%;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content {\n width: 200px;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > label .checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > label .checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button {\n width: 100%;\n height: 100%;\n border: 0;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-table-show-colums-popover > .component-popover-content .show-colums-select > .show-colums-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}\n\n.paraui-v3-filter-popover > .component-popover-content {\n width: 200px;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > label .checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > label .checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button {\n width: 50%;\n height: 100%;\n border: 0;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-filter-popover > .component-popover-content .filter-select > .filter-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}";
|
|
1537
1637
|
styleInject(css_248z);
|
|
1538
1638
|
|
|
1539
|
-
var Table = function Table(
|
|
1639
|
+
var Table = function Table(propsInit) {
|
|
1640
|
+
var props = useGlobalProps(propsInit, 'Table'); // 判断浏览器
|
|
1641
|
+
|
|
1642
|
+
var Browser = GetBrowserClass();
|
|
1643
|
+
|
|
1644
|
+
if (Browser === 'ie') {
|
|
1645
|
+
// IE浏览器没有固定列
|
|
1646
|
+
props.fixedColumn = false;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1540
1649
|
var url = props.url,
|
|
1541
1650
|
ctx = props.ctx,
|
|
1542
1651
|
emptyProps = props.emptyProps,
|
|
@@ -1589,6 +1698,8 @@ var Table = function Table(props) {
|
|
|
1589
1698
|
showColumns = _props$showColumns === void 0 ? 'inside' : _props$showColumns,
|
|
1590
1699
|
_props$fixedTable = props.fixedTable,
|
|
1591
1700
|
fixedTable = _props$fixedTable === void 0 ? true : _props$fixedTable,
|
|
1701
|
+
_props$fixedColumn = props.fixedColumn,
|
|
1702
|
+
fixedColumn = _props$fixedColumn === void 0 ? true : _props$fixedColumn,
|
|
1592
1703
|
formatter = props.formatter,
|
|
1593
1704
|
_props$lineHeight = props.lineHeight,
|
|
1594
1705
|
lineHeight = _props$lineHeight === void 0 ? 56 : _props$lineHeight,
|
|
@@ -1612,6 +1723,7 @@ var Table = function Table(props) {
|
|
|
1612
1723
|
_props$beyondText = props.beyondText,
|
|
1613
1724
|
beyondText = _props$beyondText === void 0 ? true : _props$beyondText,
|
|
1614
1725
|
loading = props.loading;
|
|
1726
|
+
var dayNum = props.expirationTime ? props.expirationTime : 7; // 过期天数
|
|
1615
1727
|
|
|
1616
1728
|
var _useState = useState(null),
|
|
1617
1729
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1621,160 +1733,159 @@ var Table = function Table(props) {
|
|
|
1621
1733
|
|
|
1622
1734
|
var _useState3 = useState(null),
|
|
1623
1735
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
1624
|
-
|
|
1625
|
-
|
|
1736
|
+
sizeCom = _useState4[0],
|
|
1737
|
+
setSizeCom = _useState4[1]; // 每页条数
|
|
1626
1738
|
|
|
1627
1739
|
|
|
1628
|
-
var _useState5 = useState(
|
|
1740
|
+
var _useState5 = useState(sizeArr),
|
|
1629
1741
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1630
|
-
|
|
1631
|
-
|
|
1742
|
+
sizeArrCom = _useState6[0],
|
|
1743
|
+
setSizeArrCom = _useState6[1]; // 每页条数数组
|
|
1632
1744
|
|
|
1633
1745
|
|
|
1634
|
-
var _useState7 = useState(
|
|
1746
|
+
var _useState7 = useState(0),
|
|
1635
1747
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1636
|
-
|
|
1637
|
-
|
|
1748
|
+
total = _useState8[0],
|
|
1749
|
+
setTotal = _useState8[1]; // 总数
|
|
1638
1750
|
|
|
1639
1751
|
|
|
1640
|
-
var _useState9 = useState(
|
|
1752
|
+
var _useState9 = useState([]),
|
|
1641
1753
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
1642
|
-
|
|
1643
|
-
|
|
1754
|
+
rowData = _useState10[0],
|
|
1755
|
+
setRowData = _useState10[1]; // 当前页数据
|
|
1644
1756
|
|
|
1645
1757
|
|
|
1646
|
-
var _useState11 = useState(
|
|
1758
|
+
var _useState11 = useState({}),
|
|
1647
1759
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
1648
|
-
|
|
1649
|
-
|
|
1760
|
+
rowDataJson = _useState12[0],
|
|
1761
|
+
setRowDataJson = _useState12[1]; // 当前页数据对象
|
|
1650
1762
|
|
|
1651
1763
|
|
|
1652
1764
|
var _useState13 = useState({}),
|
|
1653
1765
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
1654
|
-
|
|
1655
|
-
|
|
1766
|
+
totalDataJson = _useState14[0],
|
|
1767
|
+
setTotalDataJson = _useState14[1]; // 数据总数对象--用来分页记录数据的
|
|
1656
1768
|
|
|
1657
1769
|
|
|
1658
|
-
var _useState15 = useState(
|
|
1770
|
+
var _useState15 = useState([]),
|
|
1659
1771
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
1660
|
-
|
|
1661
|
-
|
|
1772
|
+
orderTypeArr = _useState16[0],
|
|
1773
|
+
setOrderTypeArr = _useState16[1]; // 排序类型
|
|
1662
1774
|
|
|
1663
1775
|
|
|
1664
1776
|
var _useState17 = useState([]),
|
|
1665
1777
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
1666
|
-
|
|
1667
|
-
|
|
1778
|
+
orderFieldArr = _useState18[0],
|
|
1779
|
+
setOrderFieldArr = _useState18[1]; // 排序字段
|
|
1668
1780
|
|
|
1669
1781
|
|
|
1670
|
-
var _useState19 = useState(
|
|
1782
|
+
var _useState19 = useState('not'),
|
|
1671
1783
|
_useState20 = _slicedToArray(_useState19, 2),
|
|
1672
|
-
|
|
1673
|
-
|
|
1784
|
+
headSelectStatus = _useState20[0],
|
|
1785
|
+
setHeadSelectStatus = _useState20[1]; // 表格头复选框状态
|
|
1674
1786
|
|
|
1675
1787
|
|
|
1676
|
-
var _useState21 = useState(
|
|
1788
|
+
var _useState21 = useState({}),
|
|
1677
1789
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
1678
|
-
|
|
1679
|
-
|
|
1790
|
+
checkJson = _useState22[0],
|
|
1791
|
+
setCheckJson = _useState22[1]; // 多选 选中的数据
|
|
1680
1792
|
|
|
1681
1793
|
|
|
1682
|
-
var _useState23 = useState(
|
|
1794
|
+
var _useState23 = useState(),
|
|
1683
1795
|
_useState24 = _slicedToArray(_useState23, 2),
|
|
1684
|
-
|
|
1685
|
-
|
|
1796
|
+
radioValue = _useState24[0],
|
|
1797
|
+
setRadioValue = _useState24[1]; // 单选 选中的数据
|
|
1686
1798
|
|
|
1687
1799
|
|
|
1688
|
-
var _useState25 = useState(),
|
|
1800
|
+
var _useState25 = useState({}),
|
|
1689
1801
|
_useState26 = _slicedToArray(_useState25, 2),
|
|
1690
|
-
|
|
1691
|
-
|
|
1802
|
+
disabledJson = _useState26[0],
|
|
1803
|
+
setDisabledJson = _useState26[1]; // 禁用对象
|
|
1692
1804
|
|
|
1693
1805
|
|
|
1694
1806
|
var _useState27 = useState({}),
|
|
1695
1807
|
_useState28 = _slicedToArray(_useState27, 2),
|
|
1696
|
-
|
|
1697
|
-
|
|
1808
|
+
originalHead = _useState28[0],
|
|
1809
|
+
setOriginalHead = _useState28[1]; // 接口原数据表头json
|
|
1698
1810
|
|
|
1699
1811
|
|
|
1700
|
-
var _useState29 = useState(
|
|
1812
|
+
var _useState29 = useState([]),
|
|
1701
1813
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
1702
|
-
|
|
1703
|
-
|
|
1814
|
+
showHeadList = _useState30[0],
|
|
1815
|
+
setShowHeadList = _useState30[1]; // 显示列下拉值 所有头部的配置
|
|
1704
1816
|
|
|
1705
1817
|
|
|
1706
1818
|
var _useState31 = useState([]),
|
|
1707
1819
|
_useState32 = _slicedToArray(_useState31, 2),
|
|
1708
|
-
|
|
1709
|
-
|
|
1820
|
+
headDataCom = _useState32[0],
|
|
1821
|
+
setHeadDataCom = _useState32[1]; // 表格当前显示列 集合本地数据
|
|
1710
1822
|
|
|
1711
1823
|
|
|
1712
|
-
var _useState33 = useState(
|
|
1824
|
+
var _useState33 = useState({}),
|
|
1713
1825
|
_useState34 = _slicedToArray(_useState33, 2),
|
|
1714
|
-
|
|
1715
|
-
|
|
1826
|
+
selectFilterCom = _useState34[0],
|
|
1827
|
+
setSelectFilterCom = _useState34[1]; // 过滤值
|
|
1716
1828
|
|
|
1717
1829
|
|
|
1718
|
-
var _useState35 = useState(
|
|
1830
|
+
var _useState35 = useState(true),
|
|
1719
1831
|
_useState36 = _slicedToArray(_useState35, 2),
|
|
1720
|
-
|
|
1721
|
-
|
|
1832
|
+
loadState = _useState36[0],
|
|
1833
|
+
setLoadState = _useState36[1]; // 加载进度条状态
|
|
1722
1834
|
|
|
1723
1835
|
|
|
1724
|
-
var _useState37 = useState(
|
|
1836
|
+
var _useState37 = useState(false),
|
|
1725
1837
|
_useState38 = _slicedToArray(_useState37, 2),
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1838
|
+
loadMoreUrl = _useState38[0],
|
|
1839
|
+
setLoadMoreUrl = _useState38[1];
|
|
1729
1840
|
|
|
1730
|
-
var _useState39 = useState(
|
|
1731
|
-
_useState40 = _slicedToArray(_useState39,
|
|
1732
|
-
|
|
1733
|
-
setLoadMoreUrl = _useState40[1];
|
|
1841
|
+
var _useState39 = useState(Math.random().toString()),
|
|
1842
|
+
_useState40 = _slicedToArray(_useState39, 1),
|
|
1843
|
+
reqId = _useState40[0];
|
|
1734
1844
|
|
|
1735
|
-
var _useState41 = useState(
|
|
1736
|
-
_useState42 = _slicedToArray(_useState41,
|
|
1737
|
-
|
|
1845
|
+
var _useState41 = useState(),
|
|
1846
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
1847
|
+
refreshCom = _useState42[0],
|
|
1848
|
+
setRefreshCom = _useState42[1];
|
|
1738
1849
|
|
|
1739
|
-
var _useState43 = useState(),
|
|
1850
|
+
var _useState43 = useState(0),
|
|
1740
1851
|
_useState44 = _slicedToArray(_useState43, 2),
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
var _useState45 = useState(0),
|
|
1745
|
-
_useState46 = _slicedToArray(_useState45, 2),
|
|
1746
|
-
tableMinWidth = _useState46[0],
|
|
1747
|
-
setTableMinWidth = _useState46[1]; // 表格最小width
|
|
1852
|
+
tableMinWidth = _useState44[0],
|
|
1853
|
+
setTableMinWidth = _useState44[1]; // 表格最小width
|
|
1748
1854
|
|
|
1749
1855
|
|
|
1750
|
-
var
|
|
1751
|
-
|
|
1752
|
-
posFixed =
|
|
1753
|
-
setPosFixed =
|
|
1856
|
+
var _useState45 = useState({}),
|
|
1857
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
1858
|
+
posFixed = _useState46[0],
|
|
1859
|
+
setPosFixed = _useState46[1];
|
|
1754
1860
|
|
|
1755
1861
|
var containerRef = useRef(); // 表格内容高度
|
|
1756
1862
|
|
|
1757
1863
|
var tableRef = useRef(); // 表格
|
|
1758
1864
|
|
|
1759
|
-
var
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1865
|
+
var constData = useRef({
|
|
1866
|
+
page: props.page !== undefined ? props.page : 1
|
|
1867
|
+
}); // 存储常量
|
|
1763
1868
|
|
|
1764
|
-
constData.loadMoreUrl = loadMore && url; // 用来判断加载更多请求是否放在表格里面
|
|
1869
|
+
constData.current.loadMoreUrl = loadMore && url; // 用来判断加载更多请求是否放在表格里面
|
|
1765
1870
|
|
|
1871
|
+
constData.current.search = search;
|
|
1872
|
+
constData.current.url = url;
|
|
1873
|
+
constData.current.orderTypeArr = orderTypeArr;
|
|
1874
|
+
constData.current.orderFieldArr = orderFieldArr;
|
|
1875
|
+
constData.current.selectFilterCom = selectFilterCom;
|
|
1876
|
+
constData.current.data = data;
|
|
1766
1877
|
useEffect(function () {
|
|
1767
1878
|
window.addEventListener('resize', changeResize);
|
|
1768
1879
|
return function () {
|
|
1769
|
-
clearTimeout(constData.reqTimer);
|
|
1770
|
-
clearTimeout(constData.loadingTimer);
|
|
1880
|
+
clearTimeout(constData.current.reqTimer);
|
|
1881
|
+
clearTimeout(constData.current.loadingTimer);
|
|
1771
1882
|
window.removeEventListener('resize', changeResize);
|
|
1772
1883
|
};
|
|
1773
1884
|
}, []);
|
|
1774
1885
|
useEffect(function () {
|
|
1775
1886
|
if (loading !== undefined) {
|
|
1776
|
-
clearTimeout(constData.loadingTimer);
|
|
1777
|
-
constData.loadingTimer = setTimeout(function () {
|
|
1887
|
+
clearTimeout(constData.current.loadingTimer);
|
|
1888
|
+
constData.current.loadingTimer = setTimeout(function () {
|
|
1778
1889
|
setLoadState(loading);
|
|
1779
1890
|
}, 50);
|
|
1780
1891
|
}
|
|
@@ -1784,18 +1895,16 @@ var Table = function Table(props) {
|
|
|
1784
1895
|
}, [loadMore, url]); // 监听page
|
|
1785
1896
|
|
|
1786
1897
|
useEffect(function () {
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
setPagePagination(pageCom);
|
|
1792
|
-
}, [pageCom]); // 自动计算表格一页展示条数
|
|
1898
|
+
if (props.page !== undefined) {
|
|
1899
|
+
handPage(props.page);
|
|
1900
|
+
}
|
|
1901
|
+
}, [page]); // 自动计算表格一页展示条数
|
|
1793
1902
|
|
|
1794
1903
|
useEffect(function () {
|
|
1795
|
-
if (!autoSize) return
|
|
1904
|
+
if (!autoSize) return handSize(size);
|
|
1796
1905
|
|
|
1797
1906
|
if (props.size) {
|
|
1798
|
-
|
|
1907
|
+
handSize(size);
|
|
1799
1908
|
} else {
|
|
1800
1909
|
if (containerRef && containerRef.current) {
|
|
1801
1910
|
var height = containerRef.current.clientHeight - 50;
|
|
@@ -1812,37 +1921,14 @@ var Table = function Table(props) {
|
|
|
1812
1921
|
setSizeArrCom(sizeArr);
|
|
1813
1922
|
}
|
|
1814
1923
|
|
|
1815
|
-
|
|
1924
|
+
handSize(columnsNUmber);
|
|
1816
1925
|
}
|
|
1817
1926
|
}
|
|
1818
1927
|
}, [size, autoSize]); // 处理表格头部
|
|
1819
1928
|
|
|
1820
1929
|
useEffect(function () {
|
|
1821
1930
|
if (props.headData !== undefined) {
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
var headArr = []; // 显示列列表
|
|
1825
|
-
|
|
1826
|
-
var json = {};
|
|
1827
|
-
|
|
1828
|
-
for (var i = 0, l = headData.length; i < l; i++) {
|
|
1829
|
-
var item = headData[i];
|
|
1830
|
-
if (typeof item.width === 'number') item.width += 'px';
|
|
1831
|
-
item.orderNum = i;
|
|
1832
|
-
if (showColumns === false) item.selected = true; // 如果不显示选择列,全部显示
|
|
1833
|
-
|
|
1834
|
-
if (item.selected) {
|
|
1835
|
-
headShowArr.push(item);
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
headArr.push(item);
|
|
1839
|
-
json[item.name] = item;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
handHeadDataCom(headShowArr);
|
|
1843
|
-
setHeadDataCom(headShowArr);
|
|
1844
|
-
setShowHeadList(headArr);
|
|
1845
|
-
constData.headDataJson = json;
|
|
1931
|
+
handInitHead(headData, false);
|
|
1846
1932
|
}
|
|
1847
1933
|
}, [headData]); // 设置总数对象
|
|
1848
1934
|
|
|
@@ -1850,29 +1936,31 @@ var Table = function Table(props) {
|
|
|
1850
1936
|
if (data) {
|
|
1851
1937
|
var handTotalDataJson = ArrayToObject(rowKey, data);
|
|
1852
1938
|
setTotalDataJson(handTotalDataJson);
|
|
1939
|
+
constData.current.data = data;
|
|
1940
|
+
setRefreshCom(Math.random());
|
|
1853
1941
|
}
|
|
1854
1942
|
}, [data]);
|
|
1855
1943
|
useEffect(function () {
|
|
1856
1944
|
// 第一次初始化不设置
|
|
1857
|
-
if (!constData.initReq) return;
|
|
1858
|
-
|
|
1859
|
-
constData.historyData = [];
|
|
1945
|
+
if (!constData.current.initReq) return;
|
|
1946
|
+
handPage(1);
|
|
1947
|
+
constData.current.historyData = [];
|
|
1860
1948
|
}, [search, url]); // 表格数据获取赋值
|
|
1861
1949
|
|
|
1862
1950
|
useEffect(function () {
|
|
1863
|
-
clearTimeout(constData.reqTimer);
|
|
1864
|
-
if (url) Cancel(reqId);
|
|
1865
|
-
constData.reqTimer = setTimeout(function () {
|
|
1866
|
-
constData.initReq = true;
|
|
1951
|
+
clearTimeout(constData.current.reqTimer);
|
|
1952
|
+
if (constData.current.url) Cancel(reqId);
|
|
1953
|
+
constData.current.reqTimer = setTimeout(function () {
|
|
1954
|
+
constData.current.initReq = true;
|
|
1867
1955
|
|
|
1868
|
-
if (url) {
|
|
1956
|
+
if (constData.current.url) {
|
|
1869
1957
|
// 提交参数
|
|
1870
1958
|
var postBody = {};
|
|
1871
1959
|
|
|
1872
1960
|
if (pagination) {
|
|
1873
|
-
if (
|
|
1874
|
-
postBody.size =
|
|
1875
|
-
postBody.page =
|
|
1961
|
+
if (constData.current.page === null || constData.current.size === null) return;
|
|
1962
|
+
postBody.size = constData.current.size;
|
|
1963
|
+
postBody.page = constData.current.page;
|
|
1876
1964
|
}
|
|
1877
1965
|
|
|
1878
1966
|
if (orderFieldArr.length > 0) {
|
|
@@ -1889,14 +1977,14 @@ var Table = function Table(props) {
|
|
|
1889
1977
|
postBody.filter = handFilterReq();
|
|
1890
1978
|
}
|
|
1891
1979
|
|
|
1892
|
-
if (search) {
|
|
1893
|
-
if (_typeof(search) === 'object') {
|
|
1894
|
-
postBody = Object.assign(Object.assign({}, postBody), search);
|
|
1980
|
+
if (constData.current.search) {
|
|
1981
|
+
if (_typeof(constData.current.search) === 'object') {
|
|
1982
|
+
postBody = Object.assign(Object.assign({}, postBody), constData.current.search);
|
|
1895
1983
|
}
|
|
1896
1984
|
}
|
|
1897
1985
|
|
|
1898
1986
|
var obj = {
|
|
1899
|
-
url: url,
|
|
1987
|
+
url: constData.current.url,
|
|
1900
1988
|
ctx: ctx,
|
|
1901
1989
|
method: method,
|
|
1902
1990
|
data: postBody
|
|
@@ -1930,19 +2018,19 @@ var Table = function Table(props) {
|
|
|
1930
2018
|
}
|
|
1931
2019
|
}
|
|
1932
2020
|
|
|
1933
|
-
if (data) {
|
|
2021
|
+
if (constData.current.data) {
|
|
1934
2022
|
var dataT = [];
|
|
1935
2023
|
|
|
1936
|
-
if (data instanceof Array) {
|
|
1937
|
-
dataT = data;
|
|
2024
|
+
if (constData.current.data instanceof Array) {
|
|
2025
|
+
dataT = constData.current.data;
|
|
1938
2026
|
} else {
|
|
1939
|
-
dataT = data.list;
|
|
2027
|
+
dataT = constData.current.data.list;
|
|
1940
2028
|
}
|
|
1941
2029
|
|
|
1942
2030
|
if (pagination) {
|
|
1943
|
-
if (
|
|
2031
|
+
if (constData.current.page === null || constData.current.size === null) return; // 分页
|
|
1944
2032
|
|
|
1945
|
-
var sliceData = dataT.slice((
|
|
2033
|
+
var sliceData = dataT.slice((constData.current.page - 1) * constData.current.size, (constData.current.page - 1) * constData.current.size + constData.current.size);
|
|
1946
2034
|
setNowPageData(sliceData);
|
|
1947
2035
|
setTotal(dataT.length);
|
|
1948
2036
|
} else {
|
|
@@ -1953,7 +2041,7 @@ var Table = function Table(props) {
|
|
|
1953
2041
|
if (props.loading === undefined) setLoadState(false);
|
|
1954
2042
|
}
|
|
1955
2043
|
}, 50);
|
|
1956
|
-
}, [
|
|
2044
|
+
}, [refresh, refreshCom]); // 单选赋值默认值
|
|
1957
2045
|
|
|
1958
2046
|
useEffect(function () {
|
|
1959
2047
|
if (radioDefaultValue !== undefined && radioDefaultValue !== radioValue) {
|
|
@@ -2034,7 +2122,139 @@ var Table = function Table(props) {
|
|
|
2034
2122
|
tableBoxScroll({
|
|
2035
2123
|
target: containerRef.current
|
|
2036
2124
|
});
|
|
2037
|
-
});
|
|
2125
|
+
});
|
|
2126
|
+
/** 设置size */
|
|
2127
|
+
|
|
2128
|
+
var handSize = function handSize(num) {
|
|
2129
|
+
constData.current.size = num;
|
|
2130
|
+
setSizeCom(num);
|
|
2131
|
+
setRefreshCom(Math.random());
|
|
2132
|
+
};
|
|
2133
|
+
/** 本地显示列key */
|
|
2134
|
+
|
|
2135
|
+
|
|
2136
|
+
var getTableHeadKey = function getTableHeadKey() {
|
|
2137
|
+
// 自定义key
|
|
2138
|
+
if (props.tableKey) {
|
|
2139
|
+
return props.tableKey;
|
|
2140
|
+
} // 本地数据
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
if (props.data) {
|
|
2144
|
+
return window.location.origin + window.location.pathname + window.location.hash;
|
|
2145
|
+
} // url
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
if (props.url) {
|
|
2149
|
+
return props.url + '_' + (props.method || 'Get');
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
return '';
|
|
2153
|
+
};
|
|
2154
|
+
/** 获取储存的表头列 */
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
var getLocalStorageHeadCom = function getLocalStorageHeadCom() {
|
|
2158
|
+
if (props.rememberColumns === false) return {};
|
|
2159
|
+
var json = getLocalStorageSelectHead(getTableHeadKey(), dayNum);
|
|
2160
|
+
return json;
|
|
2161
|
+
};
|
|
2162
|
+
/** 设置本地表格列 */
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
var setLocalStorageHeadCom = function setLocalStorageHeadCom(headArr) {
|
|
2166
|
+
if (props.rememberColumns === false) return;
|
|
2167
|
+
var selectHeadJson = ArrayToObject('name', headArr);
|
|
2168
|
+
var json = {
|
|
2169
|
+
headName: {},
|
|
2170
|
+
storageTime: new Date().getTime(),
|
|
2171
|
+
validity: dayNum * (60 * 60 * 24)
|
|
2172
|
+
};
|
|
2173
|
+
|
|
2174
|
+
for (var i = 0, l = showHeadList.length; i < l; i++) {
|
|
2175
|
+
var item = showHeadList[i];
|
|
2176
|
+
var name = item.name || '';
|
|
2177
|
+
json.headName[name] = false;
|
|
2178
|
+
|
|
2179
|
+
if (selectHeadJson[name]) {
|
|
2180
|
+
json.headName[name] = true;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
setLocalStorageSelectHead(getTableHeadKey(), json);
|
|
2185
|
+
};
|
|
2186
|
+
/**
|
|
2187
|
+
* 处理表格列是否显示
|
|
2188
|
+
* @param item {HeadDataProps} 当前列
|
|
2189
|
+
* @param showHeadArr {HeadDataProps[]} 显示列与本地数据集合
|
|
2190
|
+
* @param localHead {HeadLocalStorageItem} 本地显示列数据
|
|
2191
|
+
* */
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
var handHeadShow = function handHeadShow(item, showHeadArr, localHead) {
|
|
2195
|
+
if (showColumns === false) {
|
|
2196
|
+
// 如果不显示选择列,全部显示
|
|
2197
|
+
showHeadArr.push(item);
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
if (props.rememberColumns === false) {
|
|
2202
|
+
// 不记住列
|
|
2203
|
+
if (item.selected) showHeadArr.push(item);
|
|
2204
|
+
} else {
|
|
2205
|
+
// 记住列
|
|
2206
|
+
var nameSelectJson = localHead.headName || {};
|
|
2207
|
+
var name = item.name || '';
|
|
2208
|
+
var nameSelect = nameSelectJson[name];
|
|
2209
|
+
|
|
2210
|
+
if (nameSelect !== undefined) {
|
|
2211
|
+
// 存在本地选择列里面,选中添加到显示列
|
|
2212
|
+
if (nameSelect) showHeadArr.push(item);
|
|
2213
|
+
} else {
|
|
2214
|
+
// 不存在本地选择列里面,当前选中,则添加进去
|
|
2215
|
+
if (item.selected) showHeadArr.push(item);
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
};
|
|
2219
|
+
/**
|
|
2220
|
+
* 初始化设置表头
|
|
2221
|
+
* @param arr {(HeadDataProps | HeadDataReqProps)[]} 表头数据
|
|
2222
|
+
* @param bol {boolean} true请求表头
|
|
2223
|
+
* */
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
var handInitHead = function handInitHead(arr, bol) {
|
|
2227
|
+
var headShowArr = []; // 表格显示列
|
|
2228
|
+
|
|
2229
|
+
var headArr = []; // 显示列列表
|
|
2230
|
+
|
|
2231
|
+
var json = {};
|
|
2232
|
+
var localHead = getLocalStorageHeadCom();
|
|
2233
|
+
|
|
2234
|
+
for (var i = 0, l = arr.length; i < l; i++) {
|
|
2235
|
+
var item = arr[i];
|
|
2236
|
+
if (typeof item.width === 'number') item.width += 'px';
|
|
2237
|
+
if (!bol) item.orderNum = i;
|
|
2238
|
+
handHeadShow(item, headShowArr, localHead);
|
|
2239
|
+
headArr.push(item);
|
|
2240
|
+
json[item.name] = item;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
if (bol) {
|
|
2244
|
+
headShowArr.sort(function (a, b) {
|
|
2245
|
+
return Number(a.orderNum) - Number(b.orderNum);
|
|
2246
|
+
});
|
|
2247
|
+
headArr.sort(function (a, b) {
|
|
2248
|
+
return Number(a.orderNum) - Number(b.orderNum);
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2252
|
+
handHeadDataCom(headShowArr);
|
|
2253
|
+
setHeadDataCom(headShowArr);
|
|
2254
|
+
setShowHeadList(headArr);
|
|
2255
|
+
constData.current.headDataJson = json;
|
|
2256
|
+
}; // 计算左边的差量
|
|
2257
|
+
|
|
2038
2258
|
|
|
2039
2259
|
var handLeftWidth = function handLeftWidth() {
|
|
2040
2260
|
var leftNum = 0; // 复选
|
|
@@ -2188,7 +2408,7 @@ var Table = function Table(props) {
|
|
|
2188
2408
|
var handFilterReq = function handFilterReq() {
|
|
2189
2409
|
var json = {};
|
|
2190
2410
|
var arr = Object.keys(selectFilterCom);
|
|
2191
|
-
var headDataJson = constData.headDataJson || {};
|
|
2411
|
+
var headDataJson = constData.current.headDataJson || {};
|
|
2192
2412
|
|
|
2193
2413
|
for (var i = 0, l = arr.length; i < l; i++) {
|
|
2194
2414
|
var name = arr[i];
|
|
@@ -2279,41 +2499,22 @@ var Table = function Table(props) {
|
|
|
2279
2499
|
if (str !== JSON.stringify(originalHead)) {
|
|
2280
2500
|
setOriginalHead(data.columns);
|
|
2281
2501
|
var arr = Object.keys(data.columns);
|
|
2282
|
-
var
|
|
2283
|
-
|
|
2284
|
-
var headArr = []; // 显示列列表
|
|
2285
|
-
|
|
2286
|
-
var json = {};
|
|
2502
|
+
var headDataArr = []; // 表头数据
|
|
2287
2503
|
|
|
2288
2504
|
for (var i = 0, l = arr.length; i < l; i++) {
|
|
2289
2505
|
var key = arr[i];
|
|
2290
2506
|
var item = data.columns[key];
|
|
2291
|
-
item.label = item.displayName;
|
|
2292
2507
|
item.name = key;
|
|
2508
|
+
item.label = item.displayName;
|
|
2293
2509
|
item.filter = item.filterFlag;
|
|
2294
2510
|
item.filterRadio = item.filterRadioFlag;
|
|
2295
2511
|
item.sort = item.orderFlag;
|
|
2296
2512
|
item.selected = item.selectedFlag;
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
// 当前显示字段
|
|
2300
|
-
headShowArr.push(item);
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
headArr.push(item);
|
|
2304
|
-
json[item.name] = item;
|
|
2513
|
+
item.width = item.width;
|
|
2514
|
+
headDataArr.push(item);
|
|
2305
2515
|
}
|
|
2306
2516
|
|
|
2307
|
-
|
|
2308
|
-
return a.orderNum - b.orderNum;
|
|
2309
|
-
});
|
|
2310
|
-
headArr.sort(function (a, b) {
|
|
2311
|
-
return a.orderNum - b.orderNum;
|
|
2312
|
-
});
|
|
2313
|
-
handHeadDataCom(headShowArr);
|
|
2314
|
-
setHeadDataCom(headShowArr);
|
|
2315
|
-
setShowHeadList(headArr);
|
|
2316
|
-
constData.headDataJson = json;
|
|
2517
|
+
handInitHead(headDataArr, true);
|
|
2317
2518
|
}
|
|
2318
2519
|
}
|
|
2319
2520
|
|
|
@@ -2321,7 +2522,11 @@ var Table = function Table(props) {
|
|
|
2321
2522
|
// 分页 data是对象
|
|
2322
2523
|
setNowPageData(data.list || []);
|
|
2323
2524
|
setTotal(data.total);
|
|
2324
|
-
|
|
2525
|
+
|
|
2526
|
+
if (data.page !== undefined && data.page !== null) {
|
|
2527
|
+
constData.current.page = Number(data.page);
|
|
2528
|
+
setPageCom(Number(data.page));
|
|
2529
|
+
}
|
|
2325
2530
|
} else {
|
|
2326
2531
|
var handData1 = [];
|
|
2327
2532
|
|
|
@@ -2342,8 +2547,8 @@ var Table = function Table(props) {
|
|
|
2342
2547
|
|
|
2343
2548
|
var setNowPageData = function setNowPageData(nowPageData) {
|
|
2344
2549
|
// 加载更多请求放在里面
|
|
2345
|
-
if (constData.loadMoreUrl) {
|
|
2346
|
-
var historyData = constData.historyData || [];
|
|
2550
|
+
if (constData.current.loadMoreUrl) {
|
|
2551
|
+
var historyData = constData.current.historyData || [];
|
|
2347
2552
|
|
|
2348
2553
|
if (historyData.length > 0) {
|
|
2349
2554
|
nowPageData = [].concat(_toConsumableArray(historyData), _toConsumableArray(nowPageData));
|
|
@@ -2351,7 +2556,7 @@ var Table = function Table(props) {
|
|
|
2351
2556
|
}
|
|
2352
2557
|
|
|
2353
2558
|
var handDataJson = ArrayToObject(rowKey, nowPageData);
|
|
2354
|
-
constData.historyData = nowPageData;
|
|
2559
|
+
constData.current.historyData = nowPageData;
|
|
2355
2560
|
setRowDataJson(handDataJson);
|
|
2356
2561
|
setRowData(nowPageData); // 设置总数对象
|
|
2357
2562
|
|
|
@@ -2359,6 +2564,16 @@ var Table = function Table(props) {
|
|
|
2359
2564
|
setTotalDataJson(Object.assign(Object.assign({}, totalDataJson), handDataJson));
|
|
2360
2565
|
}
|
|
2361
2566
|
};
|
|
2567
|
+
/**
|
|
2568
|
+
* 处理page
|
|
2569
|
+
* */
|
|
2570
|
+
|
|
2571
|
+
|
|
2572
|
+
var handPage = function handPage(num) {
|
|
2573
|
+
constData.current.page = num;
|
|
2574
|
+
setPageCom(num);
|
|
2575
|
+
setRefreshCom(Math.random());
|
|
2576
|
+
};
|
|
2362
2577
|
/**
|
|
2363
2578
|
* 改变页数
|
|
2364
2579
|
* @param num {number | undefined} 页数
|
|
@@ -2366,7 +2581,7 @@ var Table = function Table(props) {
|
|
|
2366
2581
|
|
|
2367
2582
|
|
|
2368
2583
|
var changePage = function changePage(num) {
|
|
2369
|
-
if (num !== undefined)
|
|
2584
|
+
if (num !== undefined) handPage(num);
|
|
2370
2585
|
clearCheckValue();
|
|
2371
2586
|
};
|
|
2372
2587
|
/**
|
|
@@ -2376,8 +2591,17 @@ var Table = function Table(props) {
|
|
|
2376
2591
|
|
|
2377
2592
|
|
|
2378
2593
|
var changeRowsPerPage = function changeRowsPerPage(num) {
|
|
2379
|
-
if (num !== undefined)
|
|
2380
|
-
|
|
2594
|
+
if (num !== undefined) handSize(num);
|
|
2595
|
+
handPage(1);
|
|
2596
|
+
};
|
|
2597
|
+
/**
|
|
2598
|
+
* 加载更多,点击改变分页
|
|
2599
|
+
*/
|
|
2600
|
+
|
|
2601
|
+
|
|
2602
|
+
var changePageMore = function changePageMore() {
|
|
2603
|
+
var pageHnad = Number(pageCom) + 1;
|
|
2604
|
+
handPage(pageHnad);
|
|
2381
2605
|
};
|
|
2382
2606
|
/**
|
|
2383
2607
|
* 排序
|
|
@@ -2428,6 +2652,9 @@ var Table = function Table(props) {
|
|
|
2428
2652
|
|
|
2429
2653
|
setOrderFieldArr(orderFieldArrHand);
|
|
2430
2654
|
setOrderTypeArr(orderTypeArrHand);
|
|
2655
|
+
constData.current.orderFieldArr = orderFieldArrHand;
|
|
2656
|
+
constData.current.orderTypeArr = orderTypeArrHand;
|
|
2657
|
+
setRefreshCom(Math.random());
|
|
2431
2658
|
};
|
|
2432
2659
|
/**
|
|
2433
2660
|
* 处理复选框往外抛值
|
|
@@ -2513,6 +2740,15 @@ var Table = function Table(props) {
|
|
|
2513
2740
|
handCheckValue({});
|
|
2514
2741
|
}
|
|
2515
2742
|
};
|
|
2743
|
+
/** 改变选择列 */
|
|
2744
|
+
|
|
2745
|
+
|
|
2746
|
+
var changeSelectHead = function changeSelectHead(arr, item) {
|
|
2747
|
+
handHeadDataCom(arr);
|
|
2748
|
+
setHeadDataCom(arr);
|
|
2749
|
+
setLocalStorageHeadCom(arr);
|
|
2750
|
+
onClickColumns && onClickColumns(arr, item);
|
|
2751
|
+
};
|
|
2516
2752
|
/**
|
|
2517
2753
|
* 改变显示列 bol true重置
|
|
2518
2754
|
* @param headShowArr 当前显示列
|
|
@@ -2534,21 +2770,17 @@ var Table = function Table(props) {
|
|
|
2534
2770
|
}
|
|
2535
2771
|
}
|
|
2536
2772
|
|
|
2537
|
-
|
|
2538
|
-
setHeadDataCom(arr);
|
|
2539
|
-
onClickColumns && onClickColumns(arr, item);
|
|
2773
|
+
changeSelectHead(arr, item);
|
|
2540
2774
|
return;
|
|
2541
2775
|
}
|
|
2542
2776
|
|
|
2543
2777
|
headShowArr.sort(function (a, b) {
|
|
2544
|
-
return a.orderNum - b.orderNum;
|
|
2778
|
+
return Number(a.orderNum) - Number(b.orderNum);
|
|
2545
2779
|
});
|
|
2546
2780
|
|
|
2547
2781
|
var headShowArrHand = _toConsumableArray(headShowArr);
|
|
2548
2782
|
|
|
2549
|
-
|
|
2550
|
-
setHeadDataCom(headShowArrHand);
|
|
2551
|
-
onClickColumns && onClickColumns(headShowArrHand, item);
|
|
2783
|
+
changeSelectHead(headShowArrHand, item);
|
|
2552
2784
|
};
|
|
2553
2785
|
/**
|
|
2554
2786
|
* 改变过滤
|
|
@@ -2556,16 +2788,9 @@ var Table = function Table(props) {
|
|
|
2556
2788
|
|
|
2557
2789
|
|
|
2558
2790
|
var changeFilter = function changeFilter(val) {
|
|
2791
|
+
constData.current.selectFilterCom = DeepClone(val);
|
|
2559
2792
|
setSelectFilterCom(DeepClone(val));
|
|
2560
|
-
|
|
2561
|
-
/**
|
|
2562
|
-
* 加载更多,点击改变分页
|
|
2563
|
-
*/
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
var changePageMore = function changePageMore() {
|
|
2567
|
-
var pageHnad = Number(pageCom) + 1;
|
|
2568
|
-
setPageCom(pageHnad);
|
|
2793
|
+
handPage(1);
|
|
2569
2794
|
}; // 表格头部memo
|
|
2570
2795
|
|
|
2571
2796
|
|
|
@@ -2591,10 +2816,11 @@ var Table = function Table(props) {
|
|
|
2591
2816
|
showColumns: showColumns,
|
|
2592
2817
|
rowKey: rowKey,
|
|
2593
2818
|
fixedTable: fixedTable,
|
|
2819
|
+
fixedColumn: fixedColumn,
|
|
2594
2820
|
posFixed: posFixed,
|
|
2595
2821
|
beyondText: beyondText
|
|
2596
2822
|
});
|
|
2597
|
-
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText]); // 表格内容memo
|
|
2823
|
+
}, [totalDataJson, showColumns, rowKey, rowData, checkJson, disabledJson, orderTypeArr, orderFieldArr, sortTable, filter, expandable, check, headSelectStatus, radio, align, showHeadList, headDataCom, selectFilterCom, operate, onClickColumns, sortTableRadio, fixedTable, posFixed, beyondText, fixedColumn]); // 表格内容memo
|
|
2598
2824
|
|
|
2599
2825
|
var TableBodyMemo = useMemo(function () {
|
|
2600
2826
|
return jsx(TableBody, {
|
|
@@ -2638,57 +2864,60 @@ var Table = function Table(props) {
|
|
|
2638
2864
|
return setRefreshCom(Math.random());
|
|
2639
2865
|
},
|
|
2640
2866
|
posFixed: posFixed,
|
|
2641
|
-
beyondText: beyondText
|
|
2867
|
+
beyondText: beyondText,
|
|
2868
|
+
fixedColumn: fixedColumn,
|
|
2869
|
+
fixedTable: fixedTable
|
|
2642
2870
|
});
|
|
2643
|
-
}, [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]); // 表格分页memo
|
|
2871
|
+
}, [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]); // 表格分页memo
|
|
2644
2872
|
|
|
2645
2873
|
var TablePaginationMemo = useMemo(function () {
|
|
2646
|
-
if (
|
|
2874
|
+
if (constData.current.page === null || constData.current.size === null || loadMore) return;
|
|
2647
2875
|
return pagination && jsx(TableHead, {
|
|
2648
2876
|
paginationType: paginationType,
|
|
2649
2877
|
autoPagination: autoPagination,
|
|
2650
2878
|
total: total,
|
|
2651
|
-
page:
|
|
2879
|
+
page: pageCom,
|
|
2652
2880
|
currentRowsPerPage: sizeCom,
|
|
2653
2881
|
rowsPerPage: sizeArrCom,
|
|
2654
2882
|
changePage: changePage,
|
|
2655
2883
|
changeRowsPerPage: changeRowsPerPage
|
|
2656
2884
|
});
|
|
2657
|
-
}, [total,
|
|
2885
|
+
}, [total, pageCom, sizeCom, sizeArrCom, pagination, loadMore, autoPagination, paginationType]); // 表格内容滚动
|
|
2658
2886
|
|
|
2659
2887
|
var tableBoxScroll = function tableBoxScroll(e) {
|
|
2660
2888
|
var dom = tableRef.current;
|
|
2661
2889
|
var scrollDom = e.target;
|
|
2662
2890
|
if (!dom || !scrollDom) return;
|
|
2663
|
-
dom.classList.remove('
|
|
2891
|
+
dom.classList.remove('table-scroll-left', 'table-scroll-right', 'table-scroll-middle');
|
|
2664
2892
|
if (scrollDom.scrollWidth <= scrollDom.clientWidth) return; // 最左边
|
|
2665
2893
|
|
|
2666
2894
|
if (scrollDom.scrollLeft === 0) {
|
|
2667
|
-
dom.classList.add('
|
|
2895
|
+
dom.classList.add('table-scroll-left');
|
|
2668
2896
|
return;
|
|
2669
2897
|
} // 最右边
|
|
2670
2898
|
|
|
2671
2899
|
|
|
2672
2900
|
if (scrollDom.scrollLeft + scrollDom.clientWidth === scrollDom.scrollWidth) {
|
|
2673
|
-
dom.classList.add('
|
|
2901
|
+
dom.classList.add('table-scroll-right');
|
|
2674
2902
|
return;
|
|
2675
2903
|
}
|
|
2676
2904
|
|
|
2677
|
-
dom.classList.add('
|
|
2905
|
+
dom.classList.add('table-scroll-middle');
|
|
2678
2906
|
}; // 处理class
|
|
2679
2907
|
|
|
2680
2908
|
|
|
2681
2909
|
var handClass = function handClass() {
|
|
2682
|
-
var str = '
|
|
2683
|
-
if (showColumns === 'inside') str +=
|
|
2684
|
-
if (pagination) str +=
|
|
2685
|
-
if (loadMore) str +=
|
|
2686
|
-
if (fixedTable) str +=
|
|
2687
|
-
if (
|
|
2688
|
-
if (
|
|
2689
|
-
if (
|
|
2690
|
-
if (
|
|
2691
|
-
if (
|
|
2910
|
+
var str = $prefixCls + '-table';
|
|
2911
|
+
if (showColumns === 'inside') str += " ".concat($prefixCls, "-table-columns-inside");
|
|
2912
|
+
if (pagination) str += " ".concat($prefixCls, "-table-pagination");
|
|
2913
|
+
if (loadMore) str += " ".concat($prefixCls, "-table-load-more");
|
|
2914
|
+
if (fixedTable) str += " ".concat($prefixCls, "-table-fixed-table");
|
|
2915
|
+
if (fixedColumn) str += " ".concat($prefixCls, "-table-fixed-cloumn");
|
|
2916
|
+
if (check) str += " ".concat($prefixCls, "-table-check");
|
|
2917
|
+
if (radio) str += " ".concat($prefixCls, "-table-radio");
|
|
2918
|
+
if (expandable) str += " ".concat($prefixCls, "-table-expandable");
|
|
2919
|
+
if (rowData.length === 0) str += " ".concat($prefixCls, "-table-no-data");
|
|
2920
|
+
if (loadState) str += " ".concat($prefixCls, "-table-load");
|
|
2692
2921
|
if (className) str += ' ' + className;
|
|
2693
2922
|
return str;
|
|
2694
2923
|
}; // 改变屏幕大小
|
|
@@ -2711,11 +2940,8 @@ var Table = function Table(props) {
|
|
|
2711
2940
|
onScroll: tableBoxScroll
|
|
2712
2941
|
}, {
|
|
2713
2942
|
children: [jsxs(TableElement, Object.assign({
|
|
2714
|
-
|
|
2715
|
-
style:
|
|
2716
|
-
tableLayout: 'fixed',
|
|
2717
|
-
minWidth: tableMinWidth + 'px'
|
|
2718
|
-
} : {
|
|
2943
|
+
fixedColumn: fixedColumn,
|
|
2944
|
+
style: {
|
|
2719
2945
|
minWidth: tableMinWidth + 'px'
|
|
2720
2946
|
}
|
|
2721
2947
|
}, {
|