@sheinx/base 3.10.2-beta.1 → 3.10.2-beta.3
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/table/table.d.ts.map +1 -1
- package/cjs/table/table.js +22 -2
- package/esm/table/table.d.ts.map +1 -1
- package/esm/table/table.js +22 -2
- package/package.json +2 -2
package/cjs/table/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAgB,UAAU,EAAoB,MAAM,cAAc,CAAC;AAgB1E,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAgB,UAAU,EAAoB,MAAM,cAAc,CAAC;AAgB1E,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,2CA22BxE"}
|
package/cjs/table/table.js
CHANGED
|
@@ -593,7 +593,7 @@ function Table(props) {
|
|
|
593
593
|
})
|
|
594
594
|
}));
|
|
595
595
|
if (isRenderVirtualTable) {
|
|
596
|
-
var _props$data4, _virtualInfo$rowSpanI2;
|
|
596
|
+
var _props$data4, _props$data5, _virtualInfo$rowSpanI2;
|
|
597
597
|
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
598
598
|
if (virtualInfo.isExternalScroll) {
|
|
599
599
|
var _props$sticky$top, _props$virtualScrollC, _props$data3, _virtualInfo$rowSpanI;
|
|
@@ -642,6 +642,26 @@ function Table(props) {
|
|
|
642
642
|
})
|
|
643
643
|
});
|
|
644
644
|
}
|
|
645
|
+
|
|
646
|
+
// sticky-only:有 sticky 但不需要 virtual 的轻量路径
|
|
647
|
+
// 避免 Scroll 组件和虚拟滚动的额外开销
|
|
648
|
+
var isStickyOnly = !virtual && !!((_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length);
|
|
649
|
+
if (isStickyOnly) {
|
|
650
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
651
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0, _jsxRuntime.jsx)(StickyWrapper, _objectSpread(_objectSpread({}, stickyProps), {}, {
|
|
652
|
+
children: $headTable
|
|
653
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
654
|
+
ref: scrollRef,
|
|
655
|
+
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
656
|
+
onScroll: handleBodyScroll,
|
|
657
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("table", {
|
|
658
|
+
style: tableStyle,
|
|
659
|
+
ref: tbodyRef,
|
|
660
|
+
children: [Group, /*#__PURE__*/(0, _jsxRuntime.jsx)(_tbody.default, _objectSpread({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0, _jsxRuntime.jsx)(_tfoot.default, _objectSpread({}, footCommonProps))]
|
|
661
|
+
})
|
|
662
|
+
}), renderBottomMirrorScroller()]
|
|
663
|
+
});
|
|
664
|
+
}
|
|
645
665
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
646
666
|
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0, _jsxRuntime.jsx)(StickyWrapper, _objectSpread(_objectSpread({}, stickyProps), {}, {
|
|
647
667
|
children: $headTable
|
|
@@ -662,7 +682,7 @@ function Table(props) {
|
|
|
662
682
|
isEmpty: !!$empty,
|
|
663
683
|
tableRef: tableRef,
|
|
664
684
|
setFakeVirtual: scrollAble ? undefined : setFakeVirtual,
|
|
665
|
-
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$
|
|
685
|
+
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data5 = props.data) !== null && _props$data5 !== void 0 && _props$data5.length) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("table", {
|
|
666
686
|
style: _objectSpread(_objectSpread({}, tableStyle), {}, {
|
|
667
687
|
transform: virtualInfo.translateStyle
|
|
668
688
|
}),
|
package/esm/table/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAgB,UAAU,EAAoB,MAAM,cAAc,CAAC;AAgB1E,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["table.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAAgB,UAAU,EAAoB,MAAM,cAAc,CAAC;AAgB1E,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,2CA22BxE"}
|
package/esm/table/table.js
CHANGED
|
@@ -586,7 +586,7 @@ export default function Table(props) {
|
|
|
586
586
|
})
|
|
587
587
|
}));
|
|
588
588
|
if (isRenderVirtualTable) {
|
|
589
|
-
var _props$data4, _virtualInfo$rowSpanI2;
|
|
589
|
+
var _props$data4, _props$data5, _virtualInfo$rowSpanI2;
|
|
590
590
|
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
591
591
|
if (virtualInfo.isExternalScroll) {
|
|
592
592
|
var _props$sticky$top, _props$virtualScrollC, _props$data3, _virtualInfo$rowSpanI;
|
|
@@ -635,6 +635,26 @@ export default function Table(props) {
|
|
|
635
635
|
})
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
|
+
|
|
639
|
+
// sticky-only:有 sticky 但不需要 virtual 的轻量路径
|
|
640
|
+
// 避免 Scroll 组件和虚拟滚动的额外开销
|
|
641
|
+
var isStickyOnly = !virtual && !!((_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length);
|
|
642
|
+
if (isStickyOnly) {
|
|
643
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
644
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/_jsx(StickyWrapper, _objectSpread(_objectSpread({}, stickyProps), {}, {
|
|
645
|
+
children: $headTable
|
|
646
|
+
})), /*#__PURE__*/_jsx("div", {
|
|
647
|
+
ref: scrollRef,
|
|
648
|
+
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
649
|
+
onScroll: handleBodyScroll,
|
|
650
|
+
children: /*#__PURE__*/_jsxs("table", {
|
|
651
|
+
style: tableStyle,
|
|
652
|
+
ref: tbodyRef,
|
|
653
|
+
children: [Group, /*#__PURE__*/_jsx(Tbody, _objectSpread({}, bodyCommonProps)), showFoot && /*#__PURE__*/_jsx(Tfoot, _objectSpread({}, footCommonProps))]
|
|
654
|
+
})
|
|
655
|
+
}), renderBottomMirrorScroller()]
|
|
656
|
+
});
|
|
657
|
+
}
|
|
638
658
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
639
659
|
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/_jsx(StickyWrapper, _objectSpread(_objectSpread({}, stickyProps), {}, {
|
|
640
660
|
children: $headTable
|
|
@@ -655,7 +675,7 @@ export default function Table(props) {
|
|
|
655
675
|
isEmpty: !!$empty,
|
|
656
676
|
tableRef: tableRef,
|
|
657
677
|
setFakeVirtual: scrollAble ? undefined : setFakeVirtual,
|
|
658
|
-
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$
|
|
678
|
+
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data5 = props.data) !== null && _props$data5 !== void 0 && _props$data5.length) && /*#__PURE__*/_jsxs("table", {
|
|
659
679
|
style: _objectSpread(_objectSpread({}, tableStyle), {}, {
|
|
660
680
|
transform: virtualInfo.translateStyle
|
|
661
681
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheinx/base",
|
|
3
|
-
"version": "3.10.2-beta.
|
|
3
|
+
"version": "3.10.2-beta.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"module": "./esm/index.js",
|
|
11
11
|
"typings": "./cjs/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sheinx/hooks": "3.10.2-beta.
|
|
13
|
+
"@sheinx/hooks": "3.10.2-beta.3",
|
|
14
14
|
"immer": "^10.0.0",
|
|
15
15
|
"classnames": "^2.0.0",
|
|
16
16
|
"@shined/reactive": "^0.3.3"
|