shineout 3.10.0-beta.10 → 3.10.0-beta.12
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 +28 -11
- 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
|
@@ -545,5 +545,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
545
545
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
546
546
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
547
547
|
var _default = exports.default = {
|
|
548
|
-
version: '3.10.0-beta.
|
|
548
|
+
version: '3.10.0-beta.12'
|
|
549
549
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12345,7 +12345,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12345
12345
|
};
|
|
12346
12346
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12347
12347
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12348
|
-
/* harmony default export */ var version = ('3.10.0-beta.
|
|
12348
|
+
/* harmony default export */ var version = ('3.10.0-beta.12');
|
|
12349
12349
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12350
12350
|
|
|
12351
12351
|
|
|
@@ -16103,7 +16103,7 @@ var useBadgeStyle = styled(badge_badge, 'badge');
|
|
|
16103
16103
|
;// CONCATENATED MODULE: ../shineout-style/src/border-beam/border-beam.ts
|
|
16104
16104
|
|
|
16105
16105
|
|
|
16106
|
-
var MASK_SUPPORT = '@supports (
|
|
16106
|
+
var MASK_SUPPORT = '@supports (mask-composite: exclude)';
|
|
16107
16107
|
var PATH_SUPPORT = '@supports (offset-path: rect(0 auto auto 0 round 1px))';
|
|
16108
16108
|
var gradient = 'linear-gradient(to left, ' + CommonToken['Brand-6'] + ' 0%, ' + CommonToken['Brand-5'] + ' 70%, transparent)';
|
|
16109
16109
|
var borderBeamStyle = {
|
|
@@ -16119,10 +16119,8 @@ var borderBeamStyle = {
|
|
|
16119
16119
|
pointerEvents: 'none',
|
|
16120
16120
|
padding: 'var(--soui-border-beam-line-width, 1px)'
|
|
16121
16121
|
}, MASK_SUPPORT, defineProperty_default()({
|
|
16122
|
-
|
|
16123
|
-
|
|
16124
|
-
mask: 'var(--soui-border-beam-mask)',
|
|
16125
|
-
WebkitMaskComposite: 'xor',
|
|
16122
|
+
maskImage: 'linear-gradient(#fff 0 0), linear-gradient(#fff 0 0)',
|
|
16123
|
+
maskClip: 'content-box, border-box',
|
|
16126
16124
|
maskComposite: 'exclude'
|
|
16127
16125
|
}, PATH_SUPPORT, {
|
|
16128
16126
|
display: 'block',
|
|
@@ -65492,6 +65490,8 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
65492
65490
|
width = _useResize.width,
|
|
65493
65491
|
h = _useResize.height;
|
|
65494
65492
|
var height = h || defaultHeight;
|
|
65493
|
+
// 高度尚未测量时不设置 paddingTop,避免首帧出现巨大占位导致布局抖动
|
|
65494
|
+
var heightReady = h > 0;
|
|
65495
65495
|
var config = useConfig();
|
|
65496
65496
|
var isRtl = config.direction === 'rtl';
|
|
65497
65497
|
var scrollerStyle = {
|
|
@@ -65509,7 +65509,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
65509
65509
|
flexDirection: 'column',
|
|
65510
65510
|
top: 0
|
|
65511
65511
|
};
|
|
65512
|
-
var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
|
|
65512
|
+
var paddingTop = heightReady ? Math.max(0, Math.floor(scrollHeight - height)) : 0;
|
|
65513
65513
|
if (props.isEmpty) {
|
|
65514
65514
|
paddingTop = 0;
|
|
65515
65515
|
Object.assign(scrollerStyle, {
|
|
@@ -65604,14 +65604,31 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
65604
65604
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
65605
65605
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
65606
65606
|
if (!props.tableRef.current || !props.setFakeVirtual) return;
|
|
65607
|
-
|
|
65607
|
+
|
|
65608
|
+
// 明确的像素高度或 flex 约束时,Table 有确定的高度,可以正常虚拟滚动
|
|
65609
|
+
if (props.tableRef.current.style.flex) return;
|
|
65610
|
+
var inlineHeight = props.tableRef.current.style.height;
|
|
65611
|
+
if (inlineHeight && !inlineHeight.endsWith('%')) return;
|
|
65608
65612
|
var container = containerRef.current;
|
|
65609
65613
|
var isContainerVisible = (container === null || container === void 0 ? void 0 : container.offsetParent) !== null;
|
|
65610
65614
|
if (!isContainerVisible) return;
|
|
65611
65615
|
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
65612
|
-
|
|
65613
|
-
|
|
65616
|
+
|
|
65617
|
+
// 核心检测:如果 scrollRef 的 scrollHeight 等于 scrollRef 的 clientHeight,
|
|
65618
|
+
// 说明 scrollRef 没有被约束——它被内容撑开了(高度 = 内容高度),没有产生滚动。
|
|
65619
|
+
// 在这种情况下虚拟滚动无意义,退回全量渲染。
|
|
65620
|
+
var scrollEl = scrollRef.current;
|
|
65621
|
+
if (scrollEl && paddingTop > 0) {
|
|
65622
|
+
var noScrollConstraint = scrollEl.scrollHeight <= scrollEl.clientHeight + 1;
|
|
65623
|
+
if (noScrollConstraint) {
|
|
65624
|
+
props.setFakeVirtual(true);
|
|
65625
|
+
context.lastTableHeight = 0;
|
|
65626
|
+
return;
|
|
65627
|
+
}
|
|
65628
|
+
}
|
|
65629
|
+
|
|
65614
65630
|
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
65631
|
+
var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
|
|
65615
65632
|
if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight && !isRealScroll) {
|
|
65616
65633
|
props.setFakeVirtual(true);
|
|
65617
65634
|
context.lastTableHeight = 0;
|
|
@@ -78208,7 +78225,7 @@ var watermark_interface = __webpack_require__(6640);
|
|
|
78208
78225
|
|
|
78209
78226
|
|
|
78210
78227
|
/* harmony default export */ var src_0 = ({
|
|
78211
|
-
version: '3.10.0-beta.
|
|
78228
|
+
version: '3.10.0-beta.12'
|
|
78212
78229
|
});
|
|
78213
78230
|
}();
|
|
78214
78231
|
/******/ return __webpack_exports__;
|