@para-ui/core 3.0.35 → 3.0.37
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/CollapseLayout/index.d.ts +2 -0
- package/CollapseLayout/index.js +8 -4
- package/ComboSelect/index.js +1 -1
- package/Form/index.js +2 -2
- package/FormItem/index.js +2 -2
- package/README.md +19 -3
- package/Selector/index.js +1 -1
- package/SelectorPicker/index.d.ts +5 -2
- package/SelectorPicker/index.js +285 -150
- package/SelectorPicker/lang/en_US.d.ts +4 -0
- package/SelectorPicker/lang/index.d.ts +9 -0
- package/SelectorPicker/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +64 -47
- package/Table/interface.d.ts +19 -2
- package/Transfer/index.js +1 -1
- package/Tree/index.js +2 -2
- package/_verture/{index-c50e7727.js → index-257f53f9.js} +15 -0
- package/_verture/{index-291a16a8.js → index-c62ad493.js} +0 -0
- package/index.d.ts +0 -2
- package/index.js +2 -3
- package/package.json +1 -1
- package/umd/CollapseLayout.js +1 -1
- package/umd/ComboSelect.js +2 -2
- package/umd/Form.js +2 -2
- package/umd/FormItem.js +2 -2
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +7 -7
- package/umd/Table.js +2 -2
- package/umd/Transfer.js +1 -1
- package/umd/Tree.js +1 -1
- package/Test/index.d.ts +0 -3
- package/Test/index.js +0 -9
- package/umd/Test.js +0 -1
package/Table/index.js
CHANGED
|
@@ -556,6 +556,15 @@ var TableHead$1 = function TableHead(props) {
|
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
558
|
};
|
|
559
|
+
/**
|
|
560
|
+
* 自定义过滤确定
|
|
561
|
+
* @param val {[name: string]: any[]}
|
|
562
|
+
* */
|
|
563
|
+
var filterCustomConfirm = function filterCustomConfirm() {
|
|
564
|
+
var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
565
|
+
changeFilter && changeFilter(Object.assign({}, val));
|
|
566
|
+
setFilterHead({});
|
|
567
|
+
};
|
|
559
568
|
/**
|
|
560
569
|
* 处理TableCell
|
|
561
570
|
* @param item 当前列信息
|
|
@@ -666,6 +675,18 @@ var TableHead$1 = function TableHead(props) {
|
|
|
666
675
|
}, [expandable, posFixed, fixedColumn]);
|
|
667
676
|
// 过滤弹窗内容
|
|
668
677
|
var filterPopoverContent = function filterPopoverContent() {
|
|
678
|
+
var name = filterHead.name;
|
|
679
|
+
if (!name) return;
|
|
680
|
+
var filterValue = selectFilterCom[name] || [];
|
|
681
|
+
if (filterHead.filterRender) {
|
|
682
|
+
// 自定义渲染过滤
|
|
683
|
+
return filterHead.filterRender({
|
|
684
|
+
filterValue: filterValue,
|
|
685
|
+
selectFilterCom: selectFilterCom,
|
|
686
|
+
filterHead: filterHead,
|
|
687
|
+
setFilter: filterCustomConfirm
|
|
688
|
+
});
|
|
689
|
+
}
|
|
669
690
|
return jsxs("div", Object.assign({
|
|
670
691
|
className: "filter-select"
|
|
671
692
|
}, {
|
|
@@ -674,8 +695,6 @@ var TableHead$1 = function TableHead(props) {
|
|
|
674
695
|
}, {
|
|
675
696
|
children: function () {
|
|
676
697
|
var arr = filterHead.enums || [];
|
|
677
|
-
var name = filterHead.name;
|
|
678
|
-
var filterValue = selectFilterCom[name] || [];
|
|
679
698
|
return arr.map(function (item, index) {
|
|
680
699
|
var checked = filterValue.indexOf(item.value) !== -1;
|
|
681
700
|
return jsxs("div", Object.assign({
|
|
@@ -766,25 +785,6 @@ var TableHead$1 = function TableHead(props) {
|
|
|
766
785
|
}
|
|
767
786
|
return Object.assign(Object.assign({}, json), item.style);
|
|
768
787
|
};
|
|
769
|
-
// 处理过滤
|
|
770
|
-
var handFilterPopover = function handFilterPopover(item) {
|
|
771
|
-
return jsx(Popover, Object.assign({
|
|
772
|
-
placement: "bottom-end",
|
|
773
|
-
visible: filterHead.name === item.name,
|
|
774
|
-
content: filterPopoverContent(),
|
|
775
|
-
onVisibleChange: clickHideFilter,
|
|
776
|
-
overlayClassName: "".concat($prefixCls, "-filter-popover ").concat($prefixCls, "-scrollbar-small")
|
|
777
|
-
}, {
|
|
778
|
-
children: jsx("div", Object.assign({
|
|
779
|
-
className: handFilterClass(item),
|
|
780
|
-
onClick: clickShowFilter(item)
|
|
781
|
-
}, {
|
|
782
|
-
children: jsx("span", {
|
|
783
|
-
children: jsx(Screen, {})
|
|
784
|
-
})
|
|
785
|
-
}))
|
|
786
|
-
}));
|
|
787
|
-
};
|
|
788
788
|
// 处理拖拽
|
|
789
789
|
var handDrag = function handDrag(item) {
|
|
790
790
|
if (item.name === 'table-serial-number') return false; // 序号不拖拽
|
|
@@ -792,6 +792,8 @@ var TableHead$1 = function TableHead(props) {
|
|
|
792
792
|
return false;
|
|
793
793
|
};
|
|
794
794
|
return headData.map(function (headCell, index) {
|
|
795
|
+
var str = "".concat($prefixCls, "-filter-popover ").concat($prefixCls, "-scrollbar-small");
|
|
796
|
+
if (!headCell.filterRender) str += " ".concat($prefixCls, "-filter-popover-default");
|
|
795
797
|
return jsx(ThElement, Object.assign({
|
|
796
798
|
className: handCls(headCell),
|
|
797
799
|
align: headCell.align || align,
|
|
@@ -801,34 +803,49 @@ var TableHead$1 = function TableHead(props) {
|
|
|
801
803
|
onDragDown: onDragDown(headCell),
|
|
802
804
|
lineWidth: lineWidth
|
|
803
805
|
}, {
|
|
804
|
-
children:
|
|
805
|
-
|
|
806
|
+
children: jsx(Popover, Object.assign({
|
|
807
|
+
placement: "bottom-start",
|
|
808
|
+
visible: filterHead.name === headCell.name,
|
|
809
|
+
content: filterPopoverContent(),
|
|
810
|
+
onVisibleChange: clickHideFilter,
|
|
811
|
+
overlayClassName: str
|
|
806
812
|
}, {
|
|
807
|
-
children:
|
|
808
|
-
className:
|
|
813
|
+
children: jsxs("div", Object.assign({
|
|
814
|
+
className: handCellClass(headCell)
|
|
809
815
|
}, {
|
|
810
|
-
children: jsx("
|
|
811
|
-
className: "table-header-title
|
|
816
|
+
children: [jsx("div", Object.assign({
|
|
817
|
+
className: "table-header-title"
|
|
812
818
|
}, {
|
|
813
|
-
children: jsx(
|
|
814
|
-
|
|
819
|
+
children: jsx("span", Object.assign({
|
|
820
|
+
className: "table-header-title-label"
|
|
815
821
|
}, {
|
|
816
|
-
children:
|
|
822
|
+
children: jsx(AutoTips, Object.assign({
|
|
823
|
+
beyondText: headCell.beyondText === undefined ? beyondText : headCell.beyondText
|
|
824
|
+
}, {
|
|
825
|
+
children: headCell.label
|
|
826
|
+
}))
|
|
817
827
|
}))
|
|
818
|
-
}))
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
}, {
|
|
822
|
-
children: jsxs("span", Object.assign({
|
|
823
|
-
onClick: createSortHandler(headCell.name, headCell)
|
|
828
|
+
})), filter && headCell.name && headCell.filter && jsx("div", Object.assign({
|
|
829
|
+
className: handFilterClass(headCell),
|
|
830
|
+
onClick: clickShowFilter(headCell)
|
|
824
831
|
}, {
|
|
825
|
-
children:
|
|
826
|
-
|
|
827
|
-
})
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
+
children: jsx("span", {
|
|
833
|
+
children: jsx(Screen, {})
|
|
834
|
+
})
|
|
835
|
+
})), sortTable && headCell.name && headCell.sort !== false && jsx("div", Object.assign({
|
|
836
|
+
className: "table-sort-svg"
|
|
837
|
+
}, {
|
|
838
|
+
children: jsxs("span", Object.assign({
|
|
839
|
+
onClick: createSortHandler(headCell.name, headCell)
|
|
840
|
+
}, {
|
|
841
|
+
children: [jsx(SolidArrowUp, {
|
|
842
|
+
className: "up-svg"
|
|
843
|
+
}), jsx(SolidArrowDown, {
|
|
844
|
+
className: "down-svg"
|
|
845
|
+
})]
|
|
846
|
+
}))
|
|
847
|
+
}))]
|
|
848
|
+
}))
|
|
832
849
|
}))
|
|
833
850
|
}), headCell.name || index);
|
|
834
851
|
});
|
|
@@ -1421,14 +1438,14 @@ var TableBody = function TableBody(props) {
|
|
|
1421
1438
|
});
|
|
1422
1439
|
}, [tableCell, headData, align, formatter, orderFieldArr, orderTypeArr, sortTable, showColumns, operate, beyondText, fixedColumn]);
|
|
1423
1440
|
// 操作栏useCallback
|
|
1424
|
-
var TableOperateUseCallback = useCallback(function (row) {
|
|
1441
|
+
var TableOperateUseCallback = useCallback(function (row, rowIndex) {
|
|
1425
1442
|
if (operate) {
|
|
1426
1443
|
var colSpan = 1;
|
|
1427
1444
|
if (showColumns === "inside") colSpan = 2;
|
|
1428
1445
|
var handOperate = function handOperate() {
|
|
1429
1446
|
if (operate.render) return operate.render(row);
|
|
1430
1447
|
if (operate.operateBtnRender) {
|
|
1431
|
-
var operateConfig = operate.operateBtnRender(row);
|
|
1448
|
+
var operateConfig = operate.operateBtnRender(row, rowIndex);
|
|
1432
1449
|
return jsx(OperateBtn, Object.assign({}, operateConfig));
|
|
1433
1450
|
}
|
|
1434
1451
|
};
|
|
@@ -1512,7 +1529,7 @@ var TableBody = function TableBody(props) {
|
|
|
1512
1529
|
onClickRow && onClickRow(row, e);
|
|
1513
1530
|
}
|
|
1514
1531
|
}, {
|
|
1515
|
-
children: [TableCheckCallback(row), TableRadioCallback(row), TableExpandableMemo(row), TableContentUseCallback(row, index), TableOperateUseCallback(row)]
|
|
1532
|
+
children: [TableCheckCallback(row), TableRadioCallback(row), TableExpandableMemo(row), TableContentUseCallback(row, index), TableOperateUseCallback(row, index)]
|
|
1516
1533
|
}), row[rowKey]), TableExpandableContentUseCallback(row)]
|
|
1517
1534
|
}, index);
|
|
1518
1535
|
})
|
|
@@ -1621,7 +1638,7 @@ var TableElement = function TableElement(props) {
|
|
|
1621
1638
|
}));
|
|
1622
1639
|
};
|
|
1623
1640
|
|
|
1624
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-table {\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n position: relative;\n}\n.paraui-v3-table.paraui-v3-table-draggable * {\n user-select: none !important;\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-no-data > .table-container > table .paraui-v3-empty {\n overflow: hidden;\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.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.paraui-v3-table-load-more.paraui-v3-table-pagination > .table-contain {\n height: 100%;\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-serial-number .table-header-box .table-header-title {\n padding-right: 0;\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 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 padding-right: 8px;\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 padding-right: 8px;\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 .more-table-row > .td-element {\n bottom: 0;\n background: white;\n box-shadow: 4px -4px 8px 0px rgba(171, 176, 185, 0.12);\n z-index: 100;\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 tr.more-table-row td:first-child {\n padding-left: 8px;\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-contain > .table-pos-line {\n position: absolute;\n top: 0;\n width: 1px;\n background-color: rgb(54, 102, 214);\n z-index: 1000;\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\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}";
|
|
1641
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-table {\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: white;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n position: relative;\n}\n.paraui-v3-table.paraui-v3-table-draggable * {\n user-select: none !important;\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-no-data > .table-container > table .paraui-v3-empty {\n overflow: hidden;\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.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.paraui-v3-table-load-more.paraui-v3-table-pagination > .table-contain {\n height: 100%;\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-serial-number .table-header-box .table-header-title {\n padding-right: 0;\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 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 padding-right: 8px;\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 padding-right: 8px;\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 .more-table-row > .td-element {\n bottom: 0;\n background: white;\n box-shadow: 4px -4px 8px 0px rgba(171, 176, 185, 0.12);\n z-index: 100;\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 tr.more-table-row td:first-child {\n padding-left: 8px;\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-contain > .table-pos-line {\n position: absolute;\n top: 0;\n width: 1px;\n background-color: rgb(54, 102, 214);\n z-index: 1000;\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\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 .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}\n.paraui-v3-filter-popover.paraui-v3-filter-popover-default > .component-popover-content {\n width: 200px;\n}";
|
|
1625
1642
|
styleInject(css_248z);
|
|
1626
1643
|
|
|
1627
1644
|
var Table = function Table(propsInit) {
|
package/Table/interface.d.ts
CHANGED
|
@@ -34,15 +34,32 @@ export interface HeadDataProps {
|
|
|
34
34
|
/** 是否排序 */
|
|
35
35
|
sort?: boolean;
|
|
36
36
|
/** 渲染函数 (跟表格tableCell参数互斥) */
|
|
37
|
-
render?: (row: any,
|
|
37
|
+
render?: (row: any, head?: any, val?: any, index?: number, rowIndex?: number) => ReactNode;
|
|
38
38
|
/** 渲染操作列按钮 */
|
|
39
|
-
operateBtnRender?: (
|
|
39
|
+
operateBtnRender?: (row: any, rowIndex: number) => OperateBtnProps;
|
|
40
40
|
/** 对齐方式 */
|
|
41
41
|
align?: any;
|
|
42
42
|
/** 是否过滤 */
|
|
43
43
|
filter?: boolean;
|
|
44
44
|
/** 过滤单选,还是多选 */
|
|
45
45
|
filterRadio?: boolean;
|
|
46
|
+
/** 过滤自定义渲染
|
|
47
|
+
* filterValue: 当前过滤值
|
|
48
|
+
* selectFilter: 所有项过滤值
|
|
49
|
+
* headData: 当前头部配置
|
|
50
|
+
* setFilter: 设置过滤值
|
|
51
|
+
* */
|
|
52
|
+
filterRender?: (item: {
|
|
53
|
+
filterValue: any[];
|
|
54
|
+
selectFilter: {
|
|
55
|
+
[name: string]: any[];
|
|
56
|
+
};
|
|
57
|
+
headData: HeadDataProps;
|
|
58
|
+
/** 组装 selectFilter 值 */
|
|
59
|
+
setFilter: (selectFilter: {
|
|
60
|
+
[name: string]: any[];
|
|
61
|
+
}) => void;
|
|
62
|
+
}) => ReactNode;
|
|
46
63
|
/** 枚举 */
|
|
47
64
|
enums?: any[];
|
|
48
65
|
/** 是否显示字段 */
|
package/Transfer/index.js
CHANGED
|
@@ -3419,7 +3419,7 @@ var Transfer = function Transfer(props) {
|
|
|
3419
3419
|
setRightData(function (pre) {
|
|
3420
3420
|
// setFluctuationPosition(undefined)
|
|
3421
3421
|
// setFluctuationOrther(undefined)
|
|
3422
|
-
rightCount.forEach(function (item) {
|
|
3422
|
+
rightCount.reverse().forEach(function (item) {
|
|
3423
3423
|
pre.splice.apply(pre, [item + 1, 0].concat(_toConsumableArray(pre.splice(item, 1))));
|
|
3424
3424
|
});
|
|
3425
3425
|
setAnimationLock(false);
|
package/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-257f53f9.js';
|
|
2
|
+
export { T as default } from '../_verture/index-257f53f9.js';
|
|
3
3
|
import '../_verture/toConsumableArray-87c7d895.js';
|
|
4
4
|
import '../_verture/slicedToArray-77980792.js';
|
|
5
5
|
import '../_verture/defineProperty-62acccfc.js';
|
|
@@ -702,6 +702,7 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
702
702
|
className: "".concat($prefixCls, "-tree-title-wrapper"),
|
|
703
703
|
onMouseEnter: handleTreeNodeMEnter,
|
|
704
704
|
onMouseLeave: handleTreeNodeMLeave,
|
|
705
|
+
onClick: handleTreeNodeClick,
|
|
705
706
|
title: blockNode ? '' : undefined
|
|
706
707
|
}, {
|
|
707
708
|
children: [jsx(AutoTips, {
|
|
@@ -740,6 +741,20 @@ var Tree = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
740
741
|
showMoreActionIcon(cParentEl, false);
|
|
741
742
|
}
|
|
742
743
|
};
|
|
744
|
+
// Tree node Click
|
|
745
|
+
var handleTreeNodeClick = function handleTreeNodeClick() {
|
|
746
|
+
var _a;
|
|
747
|
+
if (!showActions) return;
|
|
748
|
+
// 点击tree node 的时候 rc 内部会把node节点的样式重写,导致之前逻辑添加的样式不存在,需要点击的时候加上样式
|
|
749
|
+
if (((_a = nodesRef.current) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
750
|
+
// 需要滞后到下次事件循环
|
|
751
|
+
setTimeout(function () {
|
|
752
|
+
nodesRef.current.forEach(function (el) {
|
|
753
|
+
showMoreActionIcon(el, true);
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
};
|
|
743
758
|
//节点显示更多图标
|
|
744
759
|
var showMoreActionIcon = function showMoreActionIcon(cParentEl, isShow) {
|
|
745
760
|
if (!cParentEl) return;
|
|
File without changes
|
package/index.d.ts
CHANGED
|
@@ -118,8 +118,6 @@ export { default as Tabs } from './Tabs';
|
|
|
118
118
|
export * from './Tabs';
|
|
119
119
|
export { default as Tag } from './Tag';
|
|
120
120
|
export * from './Tag';
|
|
121
|
-
export { default as Test } from './Test';
|
|
122
|
-
export * from './Test';
|
|
123
121
|
export { default as TextEditor } from './TextEditor';
|
|
124
122
|
export * from './TextEditor';
|
|
125
123
|
export { default as TextField } from './TextField';
|
package/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { Drawer } from './Drawer/index.js';
|
|
|
20
20
|
export { D as Dropdown } from './_verture/index-be4faaee.js';
|
|
21
21
|
export { default as Empty } from './Empty/index.js';
|
|
22
22
|
export { default as Form } from './Form/index.js';
|
|
23
|
-
export { F as FormItem } from './_verture/index-
|
|
23
|
+
export { F as FormItem } from './_verture/index-c62ad493.js';
|
|
24
24
|
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-c749e1c6.js';
|
|
25
25
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
26
26
|
export { default as Help } from './Help/index.js';
|
|
@@ -59,7 +59,6 @@ export { Switch } from './Switch/index.js';
|
|
|
59
59
|
export { default as Table } from './Table/index.js';
|
|
60
60
|
export { Tabs } from './Tabs/index.js';
|
|
61
61
|
export { Tag, TagGroup } from './Tag/index.js';
|
|
62
|
-
export { Test } from './Test/index.js';
|
|
63
62
|
export { default as TextEditor } from './TextEditor/index.js';
|
|
64
63
|
export { TextField } from './TextField/index.js';
|
|
65
64
|
export { default as TimePicker } from './TimePicker/index.js';
|
|
@@ -68,7 +67,7 @@ export { Title } from './Title/index.js';
|
|
|
68
67
|
export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
|
|
69
68
|
export { Tooltip } from './Tooltip/index.js';
|
|
70
69
|
export { SSortablejs, Transfer } from './Transfer/index.js';
|
|
71
|
-
export { T as Tree } from './_verture/index-
|
|
70
|
+
export { T as Tree } from './_verture/index-257f53f9.js';
|
|
72
71
|
export { default as Upload } from './Upload/index.js';
|
|
73
72
|
import './_verture/slicedToArray-77980792.js';
|
|
74
73
|
import 'react/jsx-runtime';
|
package/package.json
CHANGED
package/umd/CollapseLayout.js
CHANGED
|
@@ -26,4 +26,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
26
26
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
27
27
|
PERFORMANCE OF THIS SOFTWARE.
|
|
28
28
|
***************************************************************************** */
|
|
29
|
-
function(t,e){var a={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(a[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(a[o[r]]=t[o[r]])}return a}(t,["path","className","color","size","dataName","style"]);return(0,a.jsx)("svg",Object.assign({className:(o="paraui-icon",o+=" svg-icon",n&&(o+=" "+n),"primary"!==i&&"secondary"!==i&&"thirdary"!==i||(o+=" paraui-icon-"+i),u&&(o+=" paraui-icon-"+u),o),viewBox:"0 0 1024 1024","data-name":p,style:(e=Object.assign({},d),i&&"primary"!==i&&"secondary"!==i&&"thirdary"!==i&&(e.color=i),e)},f,{children:r}))},l=function(t){return(0,a.jsx)(n,Object.assign({dataName:"DoubleLeft",path:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M547.242667 813.696a42.666667 42.666667 0 0 0-12.501334-30.165333l-271.530666-271.573334 271.530666-271.488a42.666667 42.666667 0 0 0-60.330666-60.330666l-301.696 301.653333a42.666667 42.666667 0 0 0 0 60.330667l301.696 301.738666a42.666667 42.666667 0 0 0 72.832-30.165333z"}),(0,a.jsx)("path",{d:"M863.744 813.696a42.666667 42.666667 0 0 0-12.501333-30.165333l-271.530667-271.573334 271.530667-271.488a42.666667 42.666667 0 0 0-60.330667-60.330666l-301.696 301.653333a42.666667 42.666667 0 0 0 0 60.330667l301.696 301.738666a42.666667 42.666667 0 0 0 72.832-30.165333z"})]})},t))},i=function(t){return(0,a.jsx)(n,Object.assign({dataName:"DoubleRight",path:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M476.757333 813.696a42.666667 42.666667 0 0 1 12.501334-30.165333l271.530666-271.573334-271.530666-271.488a42.666667 42.666667 0 0 1 60.330666-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"}),(0,a.jsx)("path",{d:"M160.256 813.696a42.666667 42.666667 0 0 1 12.501333-30.165333l271.530667-271.573334-271.530667-271.488a42.666667 42.666667 0 0 1 60.330667-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"})]})},t))},c="paraui-v3";function u(t){var e,a,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(a=u(t[e]))&&(o&&(o+=" "),o+=a);else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function s(){for(var t,e,a=0,o="";a<arguments.length;)(t=arguments[a++])&&(e=u(t))&&(o&&(o+=" "),o+=e);return o}o(14944);function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,o=new Array(e);a<e;a++)o[a]=t[a];return o}function d(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var o,r,n=[],l=!0,i=!1;try{for(a=a.call(t);!(l=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);l=!0);}catch(t){i=!0,r=t}finally{try{l||null==a.return||a.return()}finally{if(i)throw r}}return n}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(a);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=function(a){var o,r,n,u=a.type,p=void 0===u?"left":u,y=a.showLabel,v=a.open,m=void 0!==v&&v,h=a.hideLabel,b=a.spacing,g=void 0===b?20:b,x=a.zoomLength,j=void 0===x?0:x,w=a.unit,O=void 0===w?"px":w,
|
|
29
|
+
function(t,e){var a={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(a[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(a[o[r]]=t[o[r]])}return a}(t,["path","className","color","size","dataName","style"]);return(0,a.jsx)("svg",Object.assign({className:(o="paraui-icon",o+=" svg-icon",n&&(o+=" "+n),"primary"!==i&&"secondary"!==i&&"thirdary"!==i||(o+=" paraui-icon-"+i),u&&(o+=" paraui-icon-"+u),o),viewBox:"0 0 1024 1024","data-name":p,style:(e=Object.assign({},d),i&&"primary"!==i&&"secondary"!==i&&"thirdary"!==i&&(e.color=i),e)},f,{children:r}))},l=function(t){return(0,a.jsx)(n,Object.assign({dataName:"DoubleLeft",path:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M547.242667 813.696a42.666667 42.666667 0 0 0-12.501334-30.165333l-271.530666-271.573334 271.530666-271.488a42.666667 42.666667 0 0 0-60.330666-60.330666l-301.696 301.653333a42.666667 42.666667 0 0 0 0 60.330667l301.696 301.738666a42.666667 42.666667 0 0 0 72.832-30.165333z"}),(0,a.jsx)("path",{d:"M863.744 813.696a42.666667 42.666667 0 0 0-12.501333-30.165333l-271.530667-271.573334 271.530667-271.488a42.666667 42.666667 0 0 0-60.330667-60.330666l-301.696 301.653333a42.666667 42.666667 0 0 0 0 60.330667l301.696 301.738666a42.666667 42.666667 0 0 0 72.832-30.165333z"})]})},t))},i=function(t){return(0,a.jsx)(n,Object.assign({dataName:"DoubleRight",path:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("path",{d:"M476.757333 813.696a42.666667 42.666667 0 0 1 12.501334-30.165333l271.530666-271.573334-271.530666-271.488a42.666667 42.666667 0 0 1 60.330666-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"}),(0,a.jsx)("path",{d:"M160.256 813.696a42.666667 42.666667 0 0 1 12.501333-30.165333l271.530667-271.573334-271.530667-271.488a42.666667 42.666667 0 0 1 60.330667-60.330666l301.696 301.653333a42.666667 42.666667 0 0 1 0 60.373333l-301.696 301.696a42.666667 42.666667 0 0 1-72.832-30.165333z"})]})},t))},c="paraui-v3";function u(t){var e,a,o="";if("string"==typeof t||"number"==typeof t)o+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(a=u(t[e]))&&(o&&(o+=" "),o+=a);else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function s(){for(var t,e,a=0,o="";a<arguments.length;)(t=arguments[a++])&&(e=u(t))&&(o&&(o+=" "),o+=e);return o}o(14944);function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,o=new Array(e);a<e;a++)o[a]=t[a];return o}function d(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=a){var o,r,n=[],l=!0,i=!1;try{for(a=a.call(t);!(l=(o=a.next()).done)&&(n.push(o.value),!e||n.length!==e);l=!0);}catch(t){i=!0,r=t}finally{try{l||null==a.return||a.return()}finally{if(i)throw r}}return n}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return p(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(a);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return p(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var y=function(a){var o,r,n,u=a.type,p=void 0===u?"left":u,y=a.showLabel,v=a.open,m=void 0!==v&&v,h=a.hideLabel,b=a.spacing,g=void 0===b?20:b,x=a.zoomLength,j=void 0===x?0:x,w=a.unit,O=void 0===w?"px":w,k=a.style,S=a.className,N=void 0===S?"":S,C=a.onClickBtn,E=(0,t.useRef)(null),z=(o=E.current)?function(t){if(!t)return 0;var e=t/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}(o.getBoundingClientRect().width):0,_=f((0,t.useState)(),2),M=_[0],P=_[1],T={layout:{left:["display","default"],right:["default","display"],top:["display","default"],bottom:["default","display"]}},A=function(t){return t.slice(0,1).toUpperCase()+t.slice(1)},I=function(){var t="width";return"top"!==p&&"bottom"!==p||(t="height"),t},R=function(){var t={},e="margin".concat(A(p));return t[I()]=j+O,t[e]=(M?0:j)+O,t.transitionDuration=z+"ms",t},L=function(){var t={},e=I(),a=M?j:0;return t[e]="calc(100% - ".concat(a+g).concat(O),t["margin".concat(A(p))]=g+O,t.transitionDuration=z+"ms",t},U=function(){P(!M),C&&C(!M)};return(0,t.useEffect)((function(){P(m)}),[m]),e().createElement("div",{className:s("".concat(c,"-collapse-layout"),"".concat(c,"-collapse-layout-").concat(M),"".concat(c,"-collapse-layout-").concat(p),"".concat(c,"-collapse-layout-").concat(p,"-").concat(M),N),style:k},(n=M?y:h,e().createElement("div",{className:"collapse-layout-click collapse-layout-click-label-".concat(!!n),style:(r={},d(r,p,"".concat(M?j:0).concat(O)),d(r,"transitionDuration",z+"ms"),r),onClick:U},n&&e().createElement("span",null,n),M?e().createElement(l,{className:"collapse-layout-icon-transform-".concat(p)}):e().createElement(i,{className:"collapse-layout-icon-transform-".concat(p)}))),T.layout[p].map((function(t,o){return"display"===t?e().createElement("div",{key:o,className:"collapse-layout-display",style:(r={},n=(M?j:0)+O,r[I()]=n,r.transitionDuration=z+"ms",r)},e().createElement("div",{className:"collapse-layout-display-shadow",style:R(),ref:E},a.displayContent)):e().createElement("div",{key:o,className:"collapse-layout-default",style:L()},a.defaultContent);var r,n})))}}(),r}()}));
|