shineout 3.7.0-beta.25 → 3.7.0-beta.26
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/cjs/index.js +1 -1
- package/dist/shineout.js +106 -51
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.7.0-beta.
|
|
525
|
+
version: '3.7.0-beta.26'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12226,7 +12226,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12226
12226
|
};
|
|
12227
12227
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12228
12228
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12229
|
-
/* harmony default export */ var version = ('3.7.0-beta.
|
|
12229
|
+
/* harmony default export */ var version = ('3.7.0-beta.26');
|
|
12230
12230
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12231
12231
|
|
|
12232
12232
|
|
|
@@ -26018,6 +26018,11 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26018
26018
|
overflowX: 'hidden'
|
|
26019
26019
|
}
|
|
26020
26020
|
},
|
|
26021
|
+
emptyHeader: {
|
|
26022
|
+
position: 'sticky',
|
|
26023
|
+
top: 0,
|
|
26024
|
+
zIndex: 1
|
|
26025
|
+
},
|
|
26021
26026
|
emptyWrapper: {
|
|
26022
26027
|
minHeight: '170px',
|
|
26023
26028
|
width: '100%',
|
|
@@ -60804,19 +60809,16 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60804
60809
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60805
60810
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
60806
60811
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60807
|
-
|
|
60808
|
-
|
|
60812
|
+
isMouseDown: false,
|
|
60813
|
+
lastTableHeight: 0
|
|
60809
60814
|
}),
|
|
60810
60815
|
context = _useRef.current;
|
|
60811
|
-
// TODO: keepScrollTop考虑做成Table的新feat?
|
|
60812
60816
|
var _props$scrollHeight = props.scrollHeight,
|
|
60813
60817
|
scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
|
|
60814
60818
|
_props$scrollWidth = props.scrollWidth,
|
|
60815
60819
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
60816
60820
|
_props$defaultHeight = props.defaultHeight,
|
|
60817
|
-
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight
|
|
60818
|
-
_props$keepScrollTop = props.keepScrollTop,
|
|
60819
|
-
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
60821
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
60820
60822
|
var _useResize = useResize({
|
|
60821
60823
|
targetRef: containerRef,
|
|
60822
60824
|
timer: 100
|
|
@@ -60842,12 +60844,14 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60842
60844
|
overflow: props.isScrollX ? 'initial' : 'hidden',
|
|
60843
60845
|
top: 0
|
|
60844
60846
|
};
|
|
60845
|
-
|
|
60846
|
-
|
|
60847
|
-
|
|
60848
|
-
|
|
60849
|
-
|
|
60850
|
-
|
|
60847
|
+
var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
|
|
60848
|
+
if (props.isEmpty) {
|
|
60849
|
+
paddingTop = 0;
|
|
60850
|
+
Object.assign(scrollerStyle, {
|
|
60851
|
+
display: 'flex',
|
|
60852
|
+
flexDirection: 'column'
|
|
60853
|
+
});
|
|
60854
|
+
}
|
|
60851
60855
|
var placeStyle = {
|
|
60852
60856
|
paddingTop: paddingTop,
|
|
60853
60857
|
width: scrollWidth,
|
|
@@ -60899,21 +60903,45 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60899
60903
|
scrollRef.current.scrollTop += scrollTop;
|
|
60900
60904
|
}
|
|
60901
60905
|
});
|
|
60906
|
+
var scrollRoleProps = objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60907
|
+
role: 'scroll'
|
|
60908
|
+
})), {}, {
|
|
60909
|
+
style: scrollerStyle,
|
|
60910
|
+
onScroll: handleScroll,
|
|
60911
|
+
ref: wrapperRef,
|
|
60912
|
+
onMouseDown: function onMouseDown() {
|
|
60913
|
+
context.isMouseDown = true;
|
|
60914
|
+
},
|
|
60915
|
+
onMouseUp: function onMouseUp() {
|
|
60916
|
+
context.isMouseDown = false;
|
|
60917
|
+
}
|
|
60918
|
+
});
|
|
60919
|
+
|
|
60920
|
+
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
60921
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
60922
|
+
if (!props.tableRef.current) return;
|
|
60923
|
+
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
60924
|
+
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
60925
|
+
if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight) {
|
|
60926
|
+
props.setFakeVirtual(true);
|
|
60927
|
+
context.lastTableHeight = 0;
|
|
60928
|
+
} else {
|
|
60929
|
+
context.lastTableHeight = rootTableHeight;
|
|
60930
|
+
}
|
|
60931
|
+
}, [paddingTop]);
|
|
60932
|
+
if (props.isEmpty) {
|
|
60933
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60934
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60935
|
+
style: {
|
|
60936
|
+
width: scrollWidth
|
|
60937
|
+
}
|
|
60938
|
+
}), props.children]
|
|
60939
|
+
}));
|
|
60940
|
+
}
|
|
60902
60941
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60903
60942
|
className: props.className,
|
|
60904
60943
|
style: props.style,
|
|
60905
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({},
|
|
60906
|
-
role: 'scroll'
|
|
60907
|
-
})), {}, {
|
|
60908
|
-
style: scrollerStyle,
|
|
60909
|
-
onScroll: handleScroll,
|
|
60910
|
-
ref: wrapperRef,
|
|
60911
|
-
onMouseDown: function onMouseDown() {
|
|
60912
|
-
context.isMouseDown = true;
|
|
60913
|
-
},
|
|
60914
|
-
onMouseUp: function onMouseUp() {
|
|
60915
|
-
context.isMouseDown = false;
|
|
60916
|
-
},
|
|
60944
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60917
60945
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60918
60946
|
role: 'scroll-container'
|
|
60919
60947
|
})), {}, {
|
|
@@ -61425,7 +61453,6 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
61425
61453
|
width: tableWidth,
|
|
61426
61454
|
shouldLastColAuto: props.columnResizable && !adjust,
|
|
61427
61455
|
scrollWidth: scrollWidth,
|
|
61428
|
-
// maxScrollLeft: scrollWidth - context.clientWidth,
|
|
61429
61456
|
resizeFlag: resizeFlag
|
|
61430
61457
|
};
|
|
61431
61458
|
};
|
|
@@ -62021,7 +62048,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62021
62048
|
var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
62022
62049
|
if (props.disabled) return props.data;
|
|
62023
62050
|
return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
62024
|
-
}, [props.data, startIndex, finalRowsInView]);
|
|
62051
|
+
}, [props.data, props.disabled, startIndex, finalRowsInView]);
|
|
62025
62052
|
var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
62026
62053
|
var t = innerTop + offsetY;
|
|
62027
62054
|
if (t < 0) {
|
|
@@ -63766,6 +63793,7 @@ var emptyRef = {
|
|
|
63766
63793
|
var tableClasses = props === null || props === void 0 || (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$table = _props$jssStyle.table) === null || _props$jssStyle$table === void 0 ? void 0 : _props$jssStyle$table.call(_props$jssStyle);
|
|
63767
63794
|
var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63768
63795
|
var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63796
|
+
var theadIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)("thead-container-".concat(generateUUID()));
|
|
63769
63797
|
var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63770
63798
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63771
63799
|
var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -63775,6 +63803,10 @@ var emptyRef = {
|
|
|
63775
63803
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63776
63804
|
scrolling = _useState2[0],
|
|
63777
63805
|
setScrolling = _useState2[1];
|
|
63806
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63807
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
63808
|
+
fakeVirtual = _useState4[0],
|
|
63809
|
+
setFakeVirtual = _useState4[1];
|
|
63778
63810
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
63779
63811
|
if (props.fixed) {
|
|
63780
63812
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
@@ -63801,7 +63833,7 @@ var emptyRef = {
|
|
|
63801
63833
|
scrollingTimer: null
|
|
63802
63834
|
}),
|
|
63803
63835
|
context = _useRef.current;
|
|
63804
|
-
var virtual = ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
63836
|
+
var virtual = !fakeVirtual && ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
63805
63837
|
|
|
63806
63838
|
// 虚拟列表高度另外计算
|
|
63807
63839
|
var _useResize = useResize({
|
|
@@ -63954,11 +63986,14 @@ var emptyRef = {
|
|
|
63954
63986
|
theadAndTfootHeight: context.theadAndTfootHeight
|
|
63955
63987
|
});
|
|
63956
63988
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
63957
|
-
var
|
|
63989
|
+
var _tableRef$current;
|
|
63958
63990
|
if (props.hideHeader || !props.sticky) return;
|
|
63959
|
-
|
|
63960
|
-
|
|
63961
|
-
|
|
63991
|
+
|
|
63992
|
+
// why use querySelectorAll: thead经历了Sticky组件的渲染再回来时,theadRef就丢失了
|
|
63993
|
+
var theads = tableRef === null || tableRef === void 0 || (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.querySelectorAll("[data-soui-role=".concat(theadIdRef.current, "]"));
|
|
63994
|
+
theads === null || theads === void 0 || theads.forEach(function (item) {
|
|
63995
|
+
item.scrollLeft = left;
|
|
63996
|
+
});
|
|
63962
63997
|
});
|
|
63963
63998
|
|
|
63964
63999
|
// 简单表格的滚动事件
|
|
@@ -64019,6 +64054,7 @@ var emptyRef = {
|
|
|
64019
64054
|
}
|
|
64020
64055
|
return null;
|
|
64021
64056
|
};
|
|
64057
|
+
var $empty = renderEmpty();
|
|
64022
64058
|
var renderTable = function renderTable() {
|
|
64023
64059
|
var _props$summary, _sticky$top, _props$data3;
|
|
64024
64060
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
@@ -64096,16 +64132,22 @@ var emptyRef = {
|
|
|
64096
64132
|
target: sticky === null || sticky === void 0 ? void 0 : sticky.target,
|
|
64097
64133
|
top: (_sticky$top = sticky === null || sticky === void 0 ? void 0 : sticky.top) !== null && _sticky$top !== void 0 ? _sticky$top : 0,
|
|
64098
64134
|
css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
|
|
64099
|
-
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
64135
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
|
|
64136
|
+
onChange: function onChange(isSticky) {
|
|
64137
|
+
if (isSticky) {
|
|
64138
|
+
var _scrollRef$current;
|
|
64139
|
+
syncHeaderScroll(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollLeft) || 0);
|
|
64140
|
+
}
|
|
64141
|
+
}
|
|
64100
64142
|
};
|
|
64101
64143
|
var isRenderVirtualTable = virtual || props.sticky || !((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length);
|
|
64102
|
-
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, props.sticky && isScrollY && tableClasses.scrollY, props.sticky && !isScrollY && tableClasses.scrollX);
|
|
64144
|
+
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, !!$empty && tableClasses.emptyHeader, props.sticky && isScrollY && tableClasses.scrollY, props.sticky && !isScrollY && tableClasses.scrollX);
|
|
64103
64145
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
64104
64146
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
64105
|
-
var _scrollRef$
|
|
64147
|
+
var _scrollRef$current2, _scrollRef$current3, _scrollRef$current4;
|
|
64106
64148
|
if (!props.showTopScrollbar) return null;
|
|
64107
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64108
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64149
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth) || 0;
|
|
64150
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth) || 0;
|
|
64109
64151
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
64110
64152
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
64111
64153
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -64130,7 +64172,7 @@ var emptyRef = {
|
|
|
64130
64172
|
ref: headMirrorScrollRef,
|
|
64131
64173
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64132
64174
|
style: {
|
|
64133
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64175
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.scrollWidth,
|
|
64134
64176
|
height: 1
|
|
64135
64177
|
}
|
|
64136
64178
|
})
|
|
@@ -64138,10 +64180,10 @@ var emptyRef = {
|
|
|
64138
64180
|
}));
|
|
64139
64181
|
};
|
|
64140
64182
|
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
64141
|
-
var _scrollRef$
|
|
64183
|
+
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
|
|
64142
64184
|
if (!props.showBottomScrollbar) return null;
|
|
64143
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64144
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64185
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
|
|
64186
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
|
|
64145
64187
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
64146
64188
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
64147
64189
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -64169,15 +64211,18 @@ var emptyRef = {
|
|
|
64169
64211
|
ref: bottomMirrorScrollRef,
|
|
64170
64212
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64171
64213
|
style: {
|
|
64172
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64214
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
|
|
64173
64215
|
height: 1
|
|
64174
64216
|
}
|
|
64175
64217
|
})
|
|
64176
64218
|
})
|
|
64177
64219
|
}));
|
|
64178
64220
|
};
|
|
64179
|
-
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64180
|
-
className: headWrapperClass
|
|
64221
|
+
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
64222
|
+
className: headWrapperClass
|
|
64223
|
+
}, getDataAttribute({
|
|
64224
|
+
role: theadIdRef.current
|
|
64225
|
+
})), {}, {
|
|
64181
64226
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64182
64227
|
style: {
|
|
64183
64228
|
width: width
|
|
@@ -64185,11 +64230,12 @@ var emptyRef = {
|
|
|
64185
64230
|
ref: theadRef,
|
|
64186
64231
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
64187
64232
|
})
|
|
64188
|
-
});
|
|
64233
|
+
}));
|
|
64189
64234
|
if (isRenderVirtualTable) {
|
|
64190
64235
|
var _props$data4;
|
|
64236
|
+
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
64191
64237
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
64192
|
-
children: [renderHeadMirrorScroller(),
|
|
64238
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
|
|
64193
64239
|
children: $headTable
|
|
64194
64240
|
})), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
|
|
64195
64241
|
style: {
|
|
@@ -64205,6 +64251,9 @@ var emptyRef = {
|
|
|
64205
64251
|
defaultHeight: context.emptyHeight,
|
|
64206
64252
|
isScrollY: isScrollY,
|
|
64207
64253
|
isScrollX: isScrollX,
|
|
64254
|
+
isEmpty: !!$empty,
|
|
64255
|
+
tableRef: tableRef,
|
|
64256
|
+
setFakeVirtual: setFakeVirtual,
|
|
64208
64257
|
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64209
64258
|
style: {
|
|
64210
64259
|
width: width,
|
|
@@ -64226,7 +64275,7 @@ var emptyRef = {
|
|
|
64226
64275
|
ref: tfootRef,
|
|
64227
64276
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64228
64277
|
})
|
|
64229
|
-
}) : null,
|
|
64278
|
+
}) : null, $empty]
|
|
64230
64279
|
}), renderBottomMirrorScroller()]
|
|
64231
64280
|
});
|
|
64232
64281
|
}
|
|
@@ -64242,7 +64291,7 @@ var emptyRef = {
|
|
|
64242
64291
|
ref: tbodyRef,
|
|
64243
64292
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
64244
64293
|
children: renderEmpty()
|
|
64245
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64294
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64246
64295
|
})
|
|
64247
64296
|
}), renderBottomMirrorScroller()]
|
|
64248
64297
|
});
|
|
@@ -64267,10 +64316,10 @@ var emptyRef = {
|
|
|
64267
64316
|
|
|
64268
64317
|
// handle head and foot scroll
|
|
64269
64318
|
var handleHeaderWheel = usePersistFn(function (e) {
|
|
64270
|
-
var _theadRef$
|
|
64319
|
+
var _theadRef$current2;
|
|
64271
64320
|
var scrollEl = scrollRef.current;
|
|
64272
64321
|
if (!scrollEl) return;
|
|
64273
|
-
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$
|
|
64322
|
+
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$current2 = theadRef.current) !== null && _theadRef$current2 !== void 0 && _theadRef$current2.parentElement)) return;
|
|
64274
64323
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
|
64275
64324
|
var scrollLeft = scrollEl.scrollLeft + e.deltaX;
|
|
64276
64325
|
if (scrollLeft === scrollEl.scrollLeft) {
|
|
@@ -64281,6 +64330,12 @@ var emptyRef = {
|
|
|
64281
64330
|
scrollEl.scrollLeft = left;
|
|
64282
64331
|
theadRef.current.parentElement.scrollLeft = left;
|
|
64283
64332
|
});
|
|
64333
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64334
|
+
var _scrollRef$current8;
|
|
64335
|
+
if (!props.sticky || !scrollRef.current || !isScrollX) return;
|
|
64336
|
+
// sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
|
|
64337
|
+
syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
|
|
64338
|
+
}, [isScrollX, props.sticky, $empty]);
|
|
64284
64339
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64285
64340
|
// 绑定 wheel 事件
|
|
64286
64341
|
if (props.sticky && theadRef.current && theadRef.current.parentElement) {
|
|
@@ -70759,7 +70814,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70759
70814
|
|
|
70760
70815
|
|
|
70761
70816
|
/* harmony default export */ var src_0 = ({
|
|
70762
|
-
version: '3.7.0-beta.
|
|
70817
|
+
version: '3.7.0-beta.26'
|
|
70763
70818
|
});
|
|
70764
70819
|
}();
|
|
70765
70820
|
/******/ return __webpack_exports__;
|