@ccs-ui/rc-pro 1.1.24-beta-3 → 1.1.24-beta-5
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/es/keep-alive-tabs/page.js +1 -1
- package/es/pro-table/table.js +25 -11
- package/package.json +1 -1
|
@@ -20,11 +20,11 @@ export default /*#__PURE__*/memo(function (props) {
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
children: /*#__PURE__*/_jsx("div", {
|
|
23
|
+
id: id,
|
|
23
24
|
style: {
|
|
24
25
|
display: active ? 'block' : 'none'
|
|
25
26
|
},
|
|
26
27
|
className: "ccs-tab-item",
|
|
27
|
-
id: id,
|
|
28
28
|
"data-display": active,
|
|
29
29
|
children: /*#__PURE__*/_jsx(Scrollbars, {
|
|
30
30
|
style: {
|
package/es/pro-table/table.js
CHANGED
|
@@ -48,6 +48,20 @@ var onTableInModalOrDrawer = function onTableInModalOrDrawer(node) {
|
|
|
48
48
|
}
|
|
49
49
|
return onTableInModalOrDrawer(parent);
|
|
50
50
|
};
|
|
51
|
+
var onTableInTabItem = function onTableInTabItem(node) {
|
|
52
|
+
var _parent$classList6;
|
|
53
|
+
var parent = node.parentNode;
|
|
54
|
+
if (!parent) return false;
|
|
55
|
+
if ( // 通过指定dom吸顶
|
|
56
|
+
(_parent$classList6 = parent.classList) !== null && _parent$classList6 !== void 0 && _parent$classList6.contains('ccs-tab-item')) {
|
|
57
|
+
return {
|
|
58
|
+
getContainer: function getContainer() {
|
|
59
|
+
return parent;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return onTableInTabItem(parent);
|
|
64
|
+
};
|
|
51
65
|
|
|
52
66
|
// 根据ID查找树形节点
|
|
53
67
|
var getDataById = function getDataById(data, rowKey, id) {
|
|
@@ -297,18 +311,18 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
297
311
|
// }, 200);
|
|
298
312
|
|
|
299
313
|
useEffect(function () {
|
|
300
|
-
//
|
|
314
|
+
// 判断是否在弹出框中
|
|
301
315
|
var inMd = onTableInModalOrDrawer(tableRef.current);
|
|
302
316
|
if (inMd) {
|
|
303
317
|
stickyRef.current = inMd;
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
// 判断在tab中
|
|
322
|
+
var inTab = onTableInTabItem(tableRef.current);
|
|
323
|
+
if (inTab) {
|
|
324
|
+
stickyRef.current = inTab;
|
|
325
|
+
return;
|
|
312
326
|
}
|
|
313
327
|
|
|
314
328
|
// // 监听resize
|
|
@@ -458,7 +472,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
458
472
|
table: table,
|
|
459
473
|
event$: event$,
|
|
460
474
|
treeRef: treeRef,
|
|
461
|
-
sticky: stickyRef.current,
|
|
475
|
+
sticky: stickyRef.current || true,
|
|
462
476
|
parentFieldName: parentFieldName,
|
|
463
477
|
setData: setData,
|
|
464
478
|
onSearchAfter: onSearchAfter,
|
|
@@ -472,7 +486,7 @@ var InternalProTable = function InternalProTable(props) {
|
|
|
472
486
|
data: data,
|
|
473
487
|
event$: event$,
|
|
474
488
|
size: isInModalOrDrawer ? 'small' : 'middle',
|
|
475
|
-
sticky: stickyRef.current
|
|
489
|
+
sticky: stickyRef.current || true
|
|
476
490
|
}, table), {}, {
|
|
477
491
|
columns: columns,
|
|
478
492
|
showSorterTooltip: true,
|