shineout 3.9.15-beta.2 → 3.9.15-beta.4
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 +26 -3
- 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.9.15-beta.
|
|
525
|
+
version: '3.9.15-beta.4'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12326,7 +12326,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12326
12326
|
};
|
|
12327
12327
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12328
12328
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12329
|
-
/* harmony default export */ var version = ('3.9.15-beta.
|
|
12329
|
+
/* harmony default export */ var version = ('3.9.15-beta.4');
|
|
12330
12330
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12331
12331
|
|
|
12332
12332
|
|
|
@@ -19764,6 +19764,9 @@ var emptyStyle = {
|
|
|
19764
19764
|
image: {
|
|
19765
19765
|
marginBottom: 8,
|
|
19766
19766
|
lineHeight: 1,
|
|
19767
|
+
'& > svg': {
|
|
19768
|
+
display: 'inline-block'
|
|
19769
|
+
},
|
|
19767
19770
|
'& img': {
|
|
19768
19771
|
width: 100,
|
|
19769
19772
|
height: 75,
|
|
@@ -66307,6 +66310,7 @@ var useTableVirtualExternal = function useTableVirtualExternal(props) {
|
|
|
66307
66310
|
setHeaderOffset = _useState2[1];
|
|
66308
66311
|
var externalStickyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
66309
66312
|
var tableOffsetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(0);
|
|
66313
|
+
var stickyCompensationTimer = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
66310
66314
|
var handleExternalScroll = usePersistFn(function () {
|
|
66311
66315
|
var _props$tableRef, _externalStickyRef$cu;
|
|
66312
66316
|
if (props.disabled) return;
|
|
@@ -66349,6 +66353,23 @@ var useTableVirtualExternal = function useTableVirtualExternal(props) {
|
|
|
66349
66353
|
if (max > 0 && scrollTop > max) {
|
|
66350
66354
|
scrollTop = max;
|
|
66351
66355
|
}
|
|
66356
|
+
|
|
66357
|
+
// 补偿 sticky 失效:滚动停止后设置补偿值,避免滚动中抖动
|
|
66358
|
+
if (externalStickyRef.current && props.externalStickyHeader) {
|
|
66359
|
+
var stickyDivFullHeight = externalStickyRef.current.offsetHeight;
|
|
66360
|
+
var stickyBreakPoint = sumHeight - stickyDivFullHeight;
|
|
66361
|
+
if (stickyCompensationTimer.current) {
|
|
66362
|
+
clearTimeout(stickyCompensationTimer.current);
|
|
66363
|
+
}
|
|
66364
|
+
externalStickyRef.current.style.setProperty('--sticky-compensation', '0px');
|
|
66365
|
+
if (rawScrollTop > stickyBreakPoint && stickyBreakPoint > 0) {
|
|
66366
|
+
var el = externalStickyRef.current;
|
|
66367
|
+
stickyCompensationTimer.current = setTimeout(function () {
|
|
66368
|
+
var compensation = rawScrollTop - stickyBreakPoint;
|
|
66369
|
+
el.style.setProperty('--sticky-compensation', "".concat(compensation, "px"));
|
|
66370
|
+
}, 150);
|
|
66371
|
+
}
|
|
66372
|
+
}
|
|
66352
66373
|
props.updateIndexAndTopFromTop(scrollTop);
|
|
66353
66374
|
});
|
|
66354
66375
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -69164,7 +69185,9 @@ function Table(props) {
|
|
|
69164
69185
|
style: {
|
|
69165
69186
|
position: 'relative',
|
|
69166
69187
|
zIndex: 1,
|
|
69167
|
-
marginTop: props.sticky ? 0 : -virtualInfo.headerOffset
|
|
69188
|
+
marginTop: props.sticky ? 0 : -virtualInfo.headerOffset,
|
|
69189
|
+
transform: 'translateY(var(--sticky-compensation, 0px))',
|
|
69190
|
+
willChange: 'transform'
|
|
69168
69191
|
},
|
|
69169
69192
|
children: $headTable
|
|
69170
69193
|
}), !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
@@ -75917,7 +75940,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
75917
75940
|
|
|
75918
75941
|
|
|
75919
75942
|
/* harmony default export */ var src_0 = ({
|
|
75920
|
-
version: '3.9.15-beta.
|
|
75943
|
+
version: '3.9.15-beta.4'
|
|
75921
75944
|
});
|
|
75922
75945
|
}();
|
|
75923
75946
|
/******/ return __webpack_exports__;
|