shineout 3.7.7-beta.5 → 3.7.7-beta.7
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 +35 -10
- 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.7-beta.
|
|
525
|
+
version: '3.7.7-beta.7'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12234
12234
|
};
|
|
12235
12235
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12236
12236
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12237
|
-
/* harmony default export */ var version = ('3.7.7-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.7.7-beta.7');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -62770,7 +62770,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62770
62770
|
for (var i = 0; i <= index; i++) {
|
|
62771
62771
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
62772
62772
|
}
|
|
62773
|
-
return sum + props.
|
|
62773
|
+
return sum + props.theadHeight + props.tfootHeight;
|
|
62774
62774
|
};
|
|
62775
62775
|
var setRowHeight = usePersistFn(function (index, height) {
|
|
62776
62776
|
if (props.disabled) return;
|
|
@@ -62913,7 +62913,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62913
62913
|
callback();
|
|
62914
62914
|
}
|
|
62915
62915
|
};
|
|
62916
|
-
props.scrollRef.current.scrollTop = beforeHeight;
|
|
62916
|
+
props.scrollRef.current.scrollTop = beforeHeight - props.theadHeight;
|
|
62917
62917
|
}
|
|
62918
62918
|
});
|
|
62919
62919
|
var scrollColumnByLeft = usePersistFn(function (targetLeft) {
|
|
@@ -62990,7 +62990,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62990
62990
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
62991
62991
|
if (props.disabled) return;
|
|
62992
62992
|
setHeight(getContentHeight(props.data.length - 1));
|
|
62993
|
-
}, [props.data.length, props.
|
|
62993
|
+
}, [props.data.length, props.theadHeight, props.tfootHeight]);
|
|
62994
62994
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
62995
62995
|
if (props.disabled) return;
|
|
62996
62996
|
if (context.heightCallback) {
|
|
@@ -64776,7 +64776,8 @@ var emptyRef = {
|
|
|
64776
64776
|
};
|
|
64777
64777
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
64778
64778
|
emptyHeight: 0,
|
|
64779
|
-
|
|
64779
|
+
theadHeight: 0,
|
|
64780
|
+
tfootHeight: 0,
|
|
64780
64781
|
scrollingTimer: null
|
|
64781
64782
|
}),
|
|
64782
64783
|
context = _useRef.current;
|
|
@@ -64909,15 +64910,38 @@ var emptyRef = {
|
|
|
64909
64910
|
onChange: inputableData.onChange,
|
|
64910
64911
|
disabled: props.disabled
|
|
64911
64912
|
});
|
|
64912
|
-
(
|
|
64913
|
+
var handleTheadAndTfootHeight = usePersistFn(function () {
|
|
64913
64914
|
var _theadRef$current, _tfootRef$current;
|
|
64914
64915
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
64915
64916
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
64916
64917
|
if (props.sticky) {
|
|
64917
|
-
context.
|
|
64918
|
+
context.tfootHeight = tfootHeight;
|
|
64918
64919
|
} else {
|
|
64919
|
-
context.
|
|
64920
|
+
context.theadHeight = theadHeight;
|
|
64921
|
+
context.tfootHeight = tfootHeight;
|
|
64922
|
+
}
|
|
64923
|
+
});
|
|
64924
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64925
|
+
handleTheadAndTfootHeight();
|
|
64926
|
+
var cancelFunc1;
|
|
64927
|
+
if (theadRef !== null && theadRef !== void 0 && theadRef.current) {
|
|
64928
|
+
cancelFunc1 = addResizeObserver(theadRef === null || theadRef === void 0 ? void 0 : theadRef.current, handleTheadAndTfootHeight, {
|
|
64929
|
+
direction: 'y',
|
|
64930
|
+
timer: 10
|
|
64931
|
+
});
|
|
64920
64932
|
}
|
|
64933
|
+
var cancelFunc2;
|
|
64934
|
+
if (tfootRef !== null && tfootRef !== void 0 && tfootRef.current) {
|
|
64935
|
+
cancelFunc2 = addResizeObserver(tfootRef === null || tfootRef === void 0 ? void 0 : tfootRef.current, handleTheadAndTfootHeight, {
|
|
64936
|
+
direction: 'y',
|
|
64937
|
+
timer: 10
|
|
64938
|
+
});
|
|
64939
|
+
}
|
|
64940
|
+
return function () {
|
|
64941
|
+
var _cancelFunc, _cancelFunc2;
|
|
64942
|
+
(_cancelFunc = cancelFunc1) === null || _cancelFunc === void 0 || _cancelFunc();
|
|
64943
|
+
(_cancelFunc2 = cancelFunc2) === null || _cancelFunc2 === void 0 || _cancelFunc2();
|
|
64944
|
+
};
|
|
64921
64945
|
}, [theadRef.current, tfootRef.current]);
|
|
64922
64946
|
var virtualInfo = use_table_virtual({
|
|
64923
64947
|
disabled: !virtual,
|
|
@@ -64930,7 +64954,8 @@ var emptyRef = {
|
|
|
64930
64954
|
innerRef: tbodyRef,
|
|
64931
64955
|
scrollLeft: props.scrollLeft,
|
|
64932
64956
|
isRtl: isRtl,
|
|
64933
|
-
|
|
64957
|
+
theadHeight: context.theadHeight,
|
|
64958
|
+
tfootHeight: context.tfootHeight
|
|
64934
64959
|
});
|
|
64935
64960
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
64936
64961
|
var _tableRef$current;
|
|
@@ -71779,7 +71804,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
71779
71804
|
|
|
71780
71805
|
|
|
71781
71806
|
/* harmony default export */ var src_0 = ({
|
|
71782
|
-
version: '3.7.7-beta.
|
|
71807
|
+
version: '3.7.7-beta.7'
|
|
71783
71808
|
});
|
|
71784
71809
|
}();
|
|
71785
71810
|
/******/ return __webpack_exports__;
|