shineout 3.7.0-beta.25 → 3.7.0-beta.27
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 +112 -53
- 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.27'
|
|
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.27');
|
|
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%',
|
|
@@ -41165,7 +41170,8 @@ var Cascader = function Cascader(props0) {
|
|
|
41165
41170
|
onCollapseProp = props.onCollapse,
|
|
41166
41171
|
size = props.size,
|
|
41167
41172
|
virtual = props.virtual,
|
|
41168
|
-
filterSameChange = props.filterSameChange
|
|
41173
|
+
filterSameChange = props.filterSameChange,
|
|
41174
|
+
beforeChange = props.beforeChange;
|
|
41169
41175
|
var showInput = isFunc(onFilterProp);
|
|
41170
41176
|
var isRealtime = cascader_isOptionalDisabled(props.disabled) ? props.disabled.isRealtime : false;
|
|
41171
41177
|
var disabled = isOptionalDisabled(disabledProp) ? disabledProp.disabled : disabledProp;
|
|
@@ -41220,6 +41226,7 @@ var Cascader = function Cascader(props0) {
|
|
|
41220
41226
|
defaultValue: defaultValue,
|
|
41221
41227
|
childrenKey: childrenKey,
|
|
41222
41228
|
value: valueProp,
|
|
41229
|
+
beforeChange: beforeChange,
|
|
41223
41230
|
onChange: onChangeProp,
|
|
41224
41231
|
filterSameChange: filterSameChange
|
|
41225
41232
|
}),
|
|
@@ -60804,19 +60811,16 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60804
60811
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60805
60812
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
60806
60813
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60807
|
-
|
|
60808
|
-
|
|
60814
|
+
isMouseDown: false,
|
|
60815
|
+
lastTableHeight: 0
|
|
60809
60816
|
}),
|
|
60810
60817
|
context = _useRef.current;
|
|
60811
|
-
// TODO: keepScrollTop考虑做成Table的新feat?
|
|
60812
60818
|
var _props$scrollHeight = props.scrollHeight,
|
|
60813
60819
|
scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
|
|
60814
60820
|
_props$scrollWidth = props.scrollWidth,
|
|
60815
60821
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
60816
60822
|
_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;
|
|
60823
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
60820
60824
|
var _useResize = useResize({
|
|
60821
60825
|
targetRef: containerRef,
|
|
60822
60826
|
timer: 100
|
|
@@ -60842,12 +60846,14 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60842
60846
|
overflow: props.isScrollX ? 'initial' : 'hidden',
|
|
60843
60847
|
top: 0
|
|
60844
60848
|
};
|
|
60845
|
-
|
|
60846
|
-
|
|
60847
|
-
|
|
60848
|
-
|
|
60849
|
-
|
|
60850
|
-
|
|
60849
|
+
var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
|
|
60850
|
+
if (props.isEmpty) {
|
|
60851
|
+
paddingTop = 0;
|
|
60852
|
+
Object.assign(scrollerStyle, {
|
|
60853
|
+
display: 'flex',
|
|
60854
|
+
flexDirection: 'column'
|
|
60855
|
+
});
|
|
60856
|
+
}
|
|
60851
60857
|
var placeStyle = {
|
|
60852
60858
|
paddingTop: paddingTop,
|
|
60853
60859
|
width: scrollWidth,
|
|
@@ -60899,21 +60905,45 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60899
60905
|
scrollRef.current.scrollTop += scrollTop;
|
|
60900
60906
|
}
|
|
60901
60907
|
});
|
|
60908
|
+
var scrollRoleProps = objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60909
|
+
role: 'scroll'
|
|
60910
|
+
})), {}, {
|
|
60911
|
+
style: scrollerStyle,
|
|
60912
|
+
onScroll: handleScroll,
|
|
60913
|
+
ref: wrapperRef,
|
|
60914
|
+
onMouseDown: function onMouseDown() {
|
|
60915
|
+
context.isMouseDown = true;
|
|
60916
|
+
},
|
|
60917
|
+
onMouseUp: function onMouseUp() {
|
|
60918
|
+
context.isMouseDown = false;
|
|
60919
|
+
}
|
|
60920
|
+
});
|
|
60921
|
+
|
|
60922
|
+
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
60923
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
60924
|
+
if (!props.tableRef.current) return;
|
|
60925
|
+
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
60926
|
+
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
60927
|
+
if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight) {
|
|
60928
|
+
props.setFakeVirtual(true);
|
|
60929
|
+
context.lastTableHeight = 0;
|
|
60930
|
+
} else {
|
|
60931
|
+
context.lastTableHeight = rootTableHeight;
|
|
60932
|
+
}
|
|
60933
|
+
}, [paddingTop]);
|
|
60934
|
+
if (props.isEmpty) {
|
|
60935
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60936
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60937
|
+
style: {
|
|
60938
|
+
width: scrollWidth
|
|
60939
|
+
}
|
|
60940
|
+
}), props.children]
|
|
60941
|
+
}));
|
|
60942
|
+
}
|
|
60902
60943
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60903
60944
|
className: props.className,
|
|
60904
60945
|
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
|
-
},
|
|
60946
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60917
60947
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60918
60948
|
role: 'scroll-container'
|
|
60919
60949
|
})), {}, {
|
|
@@ -61425,7 +61455,6 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
61425
61455
|
width: tableWidth,
|
|
61426
61456
|
shouldLastColAuto: props.columnResizable && !adjust,
|
|
61427
61457
|
scrollWidth: scrollWidth,
|
|
61428
|
-
// maxScrollLeft: scrollWidth - context.clientWidth,
|
|
61429
61458
|
resizeFlag: resizeFlag
|
|
61430
61459
|
};
|
|
61431
61460
|
};
|
|
@@ -62021,7 +62050,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62021
62050
|
var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
62022
62051
|
if (props.disabled) return props.data;
|
|
62023
62052
|
return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
62024
|
-
}, [props.data, startIndex, finalRowsInView]);
|
|
62053
|
+
}, [props.data, props.disabled, startIndex, finalRowsInView]);
|
|
62025
62054
|
var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
62026
62055
|
var t = innerTop + offsetY;
|
|
62027
62056
|
if (t < 0) {
|
|
@@ -63766,6 +63795,7 @@ var emptyRef = {
|
|
|
63766
63795
|
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
63796
|
var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63768
63797
|
var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63798
|
+
var theadIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)("thead-container-".concat(generateUUID()));
|
|
63769
63799
|
var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63770
63800
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63771
63801
|
var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -63775,6 +63805,10 @@ var emptyRef = {
|
|
|
63775
63805
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63776
63806
|
scrolling = _useState2[0],
|
|
63777
63807
|
setScrolling = _useState2[1];
|
|
63808
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63809
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
63810
|
+
fakeVirtual = _useState4[0],
|
|
63811
|
+
setFakeVirtual = _useState4[1];
|
|
63778
63812
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
63779
63813
|
if (props.fixed) {
|
|
63780
63814
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
@@ -63801,7 +63835,7 @@ var emptyRef = {
|
|
|
63801
63835
|
scrollingTimer: null
|
|
63802
63836
|
}),
|
|
63803
63837
|
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');
|
|
63838
|
+
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
63839
|
|
|
63806
63840
|
// 虚拟列表高度另外计算
|
|
63807
63841
|
var _useResize = useResize({
|
|
@@ -63954,11 +63988,14 @@ var emptyRef = {
|
|
|
63954
63988
|
theadAndTfootHeight: context.theadAndTfootHeight
|
|
63955
63989
|
});
|
|
63956
63990
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
63957
|
-
var
|
|
63991
|
+
var _tableRef$current;
|
|
63958
63992
|
if (props.hideHeader || !props.sticky) return;
|
|
63959
|
-
|
|
63960
|
-
|
|
63961
|
-
|
|
63993
|
+
|
|
63994
|
+
// why use querySelectorAll: thead经历了Sticky组件的渲染再回来时,theadRef就丢失了
|
|
63995
|
+
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, "]"));
|
|
63996
|
+
theads === null || theads === void 0 || theads.forEach(function (item) {
|
|
63997
|
+
item.scrollLeft = left;
|
|
63998
|
+
});
|
|
63962
63999
|
});
|
|
63963
64000
|
|
|
63964
64001
|
// 简单表格的滚动事件
|
|
@@ -64019,6 +64056,7 @@ var emptyRef = {
|
|
|
64019
64056
|
}
|
|
64020
64057
|
return null;
|
|
64021
64058
|
};
|
|
64059
|
+
var $empty = renderEmpty();
|
|
64022
64060
|
var renderTable = function renderTable() {
|
|
64023
64061
|
var _props$summary, _sticky$top, _props$data3;
|
|
64024
64062
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
@@ -64096,16 +64134,22 @@ var emptyRef = {
|
|
|
64096
64134
|
target: sticky === null || sticky === void 0 ? void 0 : sticky.target,
|
|
64097
64135
|
top: (_sticky$top = sticky === null || sticky === void 0 ? void 0 : sticky.top) !== null && _sticky$top !== void 0 ? _sticky$top : 0,
|
|
64098
64136
|
css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
|
|
64099
|
-
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
64137
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
|
|
64138
|
+
onChange: function onChange(isSticky) {
|
|
64139
|
+
if (isSticky) {
|
|
64140
|
+
var _scrollRef$current;
|
|
64141
|
+
syncHeaderScroll(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollLeft) || 0);
|
|
64142
|
+
}
|
|
64143
|
+
}
|
|
64100
64144
|
};
|
|
64101
64145
|
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);
|
|
64146
|
+
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
64147
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
64104
64148
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
64105
|
-
var _scrollRef$
|
|
64149
|
+
var _scrollRef$current2, _scrollRef$current3, _scrollRef$current4;
|
|
64106
64150
|
if (!props.showTopScrollbar) return null;
|
|
64107
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64108
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64151
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth) || 0;
|
|
64152
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth) || 0;
|
|
64109
64153
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
64110
64154
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
64111
64155
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -64130,7 +64174,7 @@ var emptyRef = {
|
|
|
64130
64174
|
ref: headMirrorScrollRef,
|
|
64131
64175
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64132
64176
|
style: {
|
|
64133
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64177
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.scrollWidth,
|
|
64134
64178
|
height: 1
|
|
64135
64179
|
}
|
|
64136
64180
|
})
|
|
@@ -64138,10 +64182,10 @@ var emptyRef = {
|
|
|
64138
64182
|
}));
|
|
64139
64183
|
};
|
|
64140
64184
|
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
64141
|
-
var _scrollRef$
|
|
64185
|
+
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
|
|
64142
64186
|
if (!props.showBottomScrollbar) return null;
|
|
64143
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64144
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64187
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
|
|
64188
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
|
|
64145
64189
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
64146
64190
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
64147
64191
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -64169,15 +64213,18 @@ var emptyRef = {
|
|
|
64169
64213
|
ref: bottomMirrorScrollRef,
|
|
64170
64214
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64171
64215
|
style: {
|
|
64172
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64216
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
|
|
64173
64217
|
height: 1
|
|
64174
64218
|
}
|
|
64175
64219
|
})
|
|
64176
64220
|
})
|
|
64177
64221
|
}));
|
|
64178
64222
|
};
|
|
64179
|
-
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64180
|
-
className: headWrapperClass
|
|
64223
|
+
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
64224
|
+
className: headWrapperClass
|
|
64225
|
+
}, getDataAttribute({
|
|
64226
|
+
role: theadIdRef.current
|
|
64227
|
+
})), {}, {
|
|
64181
64228
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64182
64229
|
style: {
|
|
64183
64230
|
width: width
|
|
@@ -64185,11 +64232,12 @@ var emptyRef = {
|
|
|
64185
64232
|
ref: theadRef,
|
|
64186
64233
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
64187
64234
|
})
|
|
64188
|
-
});
|
|
64235
|
+
}));
|
|
64189
64236
|
if (isRenderVirtualTable) {
|
|
64190
64237
|
var _props$data4;
|
|
64238
|
+
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
64191
64239
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
64192
|
-
children: [renderHeadMirrorScroller(),
|
|
64240
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
|
|
64193
64241
|
children: $headTable
|
|
64194
64242
|
})), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
|
|
64195
64243
|
style: {
|
|
@@ -64205,6 +64253,9 @@ var emptyRef = {
|
|
|
64205
64253
|
defaultHeight: context.emptyHeight,
|
|
64206
64254
|
isScrollY: isScrollY,
|
|
64207
64255
|
isScrollX: isScrollX,
|
|
64256
|
+
isEmpty: !!$empty,
|
|
64257
|
+
tableRef: tableRef,
|
|
64258
|
+
setFakeVirtual: setFakeVirtual,
|
|
64208
64259
|
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
64260
|
style: {
|
|
64210
64261
|
width: width,
|
|
@@ -64226,7 +64277,7 @@ var emptyRef = {
|
|
|
64226
64277
|
ref: tfootRef,
|
|
64227
64278
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64228
64279
|
})
|
|
64229
|
-
}) : null,
|
|
64280
|
+
}) : null, $empty]
|
|
64230
64281
|
}), renderBottomMirrorScroller()]
|
|
64231
64282
|
});
|
|
64232
64283
|
}
|
|
@@ -64242,7 +64293,7 @@ var emptyRef = {
|
|
|
64242
64293
|
ref: tbodyRef,
|
|
64243
64294
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
64244
64295
|
children: renderEmpty()
|
|
64245
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64296
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64246
64297
|
})
|
|
64247
64298
|
}), renderBottomMirrorScroller()]
|
|
64248
64299
|
});
|
|
@@ -64267,10 +64318,10 @@ var emptyRef = {
|
|
|
64267
64318
|
|
|
64268
64319
|
// handle head and foot scroll
|
|
64269
64320
|
var handleHeaderWheel = usePersistFn(function (e) {
|
|
64270
|
-
var _theadRef$
|
|
64321
|
+
var _theadRef$current2;
|
|
64271
64322
|
var scrollEl = scrollRef.current;
|
|
64272
64323
|
if (!scrollEl) return;
|
|
64273
|
-
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$
|
|
64324
|
+
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$current2 = theadRef.current) !== null && _theadRef$current2 !== void 0 && _theadRef$current2.parentElement)) return;
|
|
64274
64325
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
|
64275
64326
|
var scrollLeft = scrollEl.scrollLeft + e.deltaX;
|
|
64276
64327
|
if (scrollLeft === scrollEl.scrollLeft) {
|
|
@@ -64281,6 +64332,12 @@ var emptyRef = {
|
|
|
64281
64332
|
scrollEl.scrollLeft = left;
|
|
64282
64333
|
theadRef.current.parentElement.scrollLeft = left;
|
|
64283
64334
|
});
|
|
64335
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64336
|
+
var _scrollRef$current8;
|
|
64337
|
+
if (!props.sticky || !scrollRef.current || !isScrollX) return;
|
|
64338
|
+
// sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
|
|
64339
|
+
syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
|
|
64340
|
+
}, [isScrollX, props.sticky, $empty]);
|
|
64284
64341
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64285
64342
|
// 绑定 wheel 事件
|
|
64286
64343
|
if (props.sticky && theadRef.current && theadRef.current.parentElement) {
|
|
@@ -66470,6 +66527,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66470
66527
|
onChangeAddition = props.onChangeAddition,
|
|
66471
66528
|
onEnterExpand = props.onEnterExpand,
|
|
66472
66529
|
onExpand = props.onExpand,
|
|
66530
|
+
beforeChange = props.beforeChange,
|
|
66473
66531
|
filterSameChange = props.filterSameChange;
|
|
66474
66532
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$treeSelect = jssStyle.treeSelect) === null || _jssStyle$treeSelect === void 0 ? void 0 : _jssStyle$treeSelect.call(jssStyle);
|
|
66475
66533
|
var rootStyle = Object.assign({
|
|
@@ -66496,7 +66554,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66496
66554
|
defaultValue: defaultValue,
|
|
66497
66555
|
control: 'value' in props,
|
|
66498
66556
|
filterSameChange: filterSameChange,
|
|
66499
|
-
multiple: multiple
|
|
66557
|
+
multiple: multiple,
|
|
66558
|
+
beforeChange: beforeChange
|
|
66500
66559
|
}),
|
|
66501
66560
|
value = _useTreeSelect.value,
|
|
66502
66561
|
onChange = _useTreeSelect.onChange;
|
|
@@ -70759,7 +70818,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70759
70818
|
|
|
70760
70819
|
|
|
70761
70820
|
/* harmony default export */ var src_0 = ({
|
|
70762
|
-
version: '3.7.0-beta.
|
|
70821
|
+
version: '3.7.0-beta.27'
|
|
70763
70822
|
});
|
|
70764
70823
|
}();
|
|
70765
70824
|
/******/ return __webpack_exports__;
|