shineout 3.10.3-beta.3 → 3.10.3-beta.5
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 +148 -89
- 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.3-beta.
|
|
548
|
+
version: '3.10.3-beta.5'
|
|
549
549
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -13736,7 +13736,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
13736
13736
|
};
|
|
13737
13737
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
13738
13738
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
13739
|
-
/* harmony default export */ var version = ('3.10.3-beta.
|
|
13739
|
+
/* harmony default export */ var version = ('3.10.3-beta.5');
|
|
13740
13740
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
13741
13741
|
|
|
13742
13742
|
|
|
@@ -28694,7 +28694,8 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28694
28694
|
boxShadow: 'inset 8px 0 10px -6px rgba(2,11,24,.1)'
|
|
28695
28695
|
// border: 'none',
|
|
28696
28696
|
},
|
|
28697
|
-
|
|
28697
|
+
// tbody td 在 ltr 下不输出 dir 属性,用 :not([dir=rtl]) 匹配 ltr
|
|
28698
|
+
'&:not([dir=rtl])::after': {
|
|
28698
28699
|
right: "-".concat(shadowWidth, "px")
|
|
28699
28700
|
},
|
|
28700
28701
|
'&[dir=rtl]::after': {
|
|
@@ -28731,7 +28732,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28731
28732
|
right: "-".concat(shadowWidth, "px"),
|
|
28732
28733
|
boxShadow: 'inset 8px 0 10px -6px rgba(2,11,24,.1)'
|
|
28733
28734
|
},
|
|
28734
|
-
'
|
|
28735
|
+
'&:not([dir=rtl])::before': {
|
|
28735
28736
|
left: "-".concat(shadowWidth, "px")
|
|
28736
28737
|
}
|
|
28737
28738
|
},
|
|
@@ -29012,7 +29013,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
29012
29013
|
textAlign: 'left'
|
|
29013
29014
|
},
|
|
29014
29015
|
'$bordered&': {
|
|
29015
|
-
'& th:last-child[dir=
|
|
29016
|
+
'& th:last-child:not([dir=rtl]), & td:last-child:not([dir=rtl])': {
|
|
29016
29017
|
borderRight: 'none'
|
|
29017
29018
|
},
|
|
29018
29019
|
'& th:last-child[dir=rtl], & td:last-child[dir=rtl]': {
|
|
@@ -46690,7 +46691,8 @@ var useListSelectMultiple = function useListSelectMultiple(props) {
|
|
|
46690
46691
|
|
|
46691
46692
|
// TODO: Object.values(props) 作为 deps 是反模式,value/prediction 等变化都会使 datum 引用失效。
|
|
46692
46693
|
// 精确依赖应为 [props.data](方法均为 usePersistFn,引用稳定)。
|
|
46693
|
-
//
|
|
46694
|
+
// 注意:Table 开启 rowMemo 时 Tbody 会做 memo,非受控勾选时 Table 的 props 不变,
|
|
46695
|
+
// 行的勾选状态只能靠 datum 引用变化刷新。收窄 deps 前需要先给 Tbody 提供其他刷新依据(如 value)。
|
|
46694
46696
|
var func = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
46695
46697
|
return {
|
|
46696
46698
|
add: add,
|
|
@@ -58314,7 +58316,8 @@ var useListSelect = function useListSelect(props) {
|
|
|
58314
58316
|
});
|
|
58315
58317
|
|
|
58316
58318
|
// TODO: Object.values(props) 作为 deps 是反模式。精确依赖应为 [datum, multiple]。
|
|
58317
|
-
//
|
|
58319
|
+
// 注意:Table 开启 rowMemo 时 Tbody 会做 memo,非受控勾选时行的勾选状态只能靠 result 引用变化刷新,
|
|
58320
|
+
// 收窄 deps 前需要先给 Tbody 提供其他刷新依据(见 use-list-select-multiple)。
|
|
58318
58321
|
var result = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
58319
58322
|
if (!multiple) {
|
|
58320
58323
|
return objectSpread2_default()(objectSpread2_default()({}, datum), {}, {
|
|
@@ -69545,6 +69548,11 @@ var thead_toNum = toNum;
|
|
|
69545
69548
|
}),
|
|
69546
69549
|
context = _useRef.current;
|
|
69547
69550
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
69551
|
+
// 行高仅用于多级表头固定列的 sticky top,单行表头 top 恒为 0,跳过测量以避免强制同步布局
|
|
69552
|
+
if (columnLevel === 0) {
|
|
69553
|
+
context.trHeights = [];
|
|
69554
|
+
return;
|
|
69555
|
+
}
|
|
69548
69556
|
var heights = trRefs.current.map(function (tr) {
|
|
69549
69557
|
return (tr === null || tr === void 0 ? void 0 : tr.offsetHeight) || 0;
|
|
69550
69558
|
});
|
|
@@ -70033,13 +70041,74 @@ function Td(props) {
|
|
|
70033
70041
|
onMouseEnter: onMouseEnter,
|
|
70034
70042
|
onMouseLeave: onMouseLeave,
|
|
70035
70043
|
className: className,
|
|
70036
|
-
style: props.style
|
|
70037
|
-
|
|
70044
|
+
style: props.style
|
|
70045
|
+
// ltr 为默认方向,可从 table 继承,省略以减少大数据量下逐个单元格的 setAttribute
|
|
70046
|
+
,
|
|
70047
|
+
dir: direction === 'rtl' ? direction : undefined,
|
|
70038
70048
|
"data-role": role,
|
|
70039
70049
|
onClick: onClick,
|
|
70040
70050
|
children: renderContent(props.col, props.data)
|
|
70041
70051
|
}, col.key);
|
|
70042
70052
|
}
|
|
70053
|
+
;// CONCATENATED MODULE: ../base/src/table/fixed-style.ts
|
|
70054
|
+
|
|
70055
|
+
|
|
70056
|
+
var fixed_style_toNum = toNum;
|
|
70057
|
+
|
|
70058
|
+
// 表体固定列的 sticky 偏移以 CSS 变量的形式写在 tbody 所在的 table 上,单元格只引用变量。
|
|
70059
|
+
// 列宽测量、横向滚动状态变化时只需更新 table 的 style,单元格的 style 不变,行无需重渲染。
|
|
70060
|
+
// 每个 Table 都会在自己的 table 上重新声明变量,嵌套表格不会继承到外层的值。
|
|
70061
|
+
// position: sticky 必须内联:样式中 `table td { position: relative }` 的优先级高于 cellFixedRight 类名。
|
|
70062
|
+
// 未出现横向滚动时偏移为 auto,sticky 不会吸附,效果与原先不输出固定样式一致。
|
|
70063
|
+
var getLeftVar = function getLeftVar(index) {
|
|
70064
|
+
return "--soui-table-fixed-left-".concat(index);
|
|
70065
|
+
};
|
|
70066
|
+
// right 偏移取决于单元格的结束列(index + colSpan),按结束列声明
|
|
70067
|
+
var getRightVar = function getRightVar(end) {
|
|
70068
|
+
return "--soui-table-fixed-right-".concat(end);
|
|
70069
|
+
};
|
|
70070
|
+
var cellStyleCache = new Map();
|
|
70071
|
+
var getCellFixedStyle = function getCellFixedStyle(fixed, index, colSpan, columnCount, isRtl) {
|
|
70072
|
+
if (fixed !== 'left' && fixed !== 'right') return undefined;
|
|
70073
|
+
var end = Math.min(index + (colSpan || 1), columnCount);
|
|
70074
|
+
var varName = fixed === 'left' ? getLeftVar(index) : getRightVar(end);
|
|
70075
|
+
var key = "".concat(varName, "-").concat(isRtl ? 'rtl' : 'ltr');
|
|
70076
|
+
var style = cellStyleCache.get(key);
|
|
70077
|
+
if (!style) {
|
|
70078
|
+
var side = fixed === 'left' !== isRtl ? 'left' : 'right';
|
|
70079
|
+
style = defineProperty_default()({
|
|
70080
|
+
position: 'sticky'
|
|
70081
|
+
}, side, "var(".concat(varName, ")"));
|
|
70082
|
+
cellStyleCache.set(key, style);
|
|
70083
|
+
}
|
|
70084
|
+
return style;
|
|
70085
|
+
};
|
|
70086
|
+
var getFixedVarsStyle = function getFixedVarsStyle(columns, colgroup, isScrollX) {
|
|
70087
|
+
var rightStart = -1;
|
|
70088
|
+
var leftIndexes = [];
|
|
70089
|
+
columns.forEach(function (col) {
|
|
70090
|
+
if (col.fixed === 'left') leftIndexes.push(col.index);
|
|
70091
|
+
if (col.fixed === 'right' && (rightStart === -1 || col.index < rightStart)) {
|
|
70092
|
+
rightStart = col.index;
|
|
70093
|
+
}
|
|
70094
|
+
});
|
|
70095
|
+
if (!leftIndexes.length && rightStart === -1) return undefined;
|
|
70096
|
+
var style = {};
|
|
70097
|
+
var sum = function sum(start, end) {
|
|
70098
|
+
return colgroup.slice(start, end).reduce(function (a, b) {
|
|
70099
|
+
return a + fixed_style_toNum(b);
|
|
70100
|
+
}, 0);
|
|
70101
|
+
};
|
|
70102
|
+
leftIndexes.forEach(function (index) {
|
|
70103
|
+
style[getLeftVar(index)] = isScrollX ? "".concat(sum(0, index), "px") : 'auto';
|
|
70104
|
+
});
|
|
70105
|
+
if (rightStart > -1) {
|
|
70106
|
+
for (var end = rightStart + 1; end <= columns.length; end++) {
|
|
70107
|
+
style[getRightVar(end)] = isScrollX ? "".concat(sum(end, colgroup.length), "px") : 'auto';
|
|
70108
|
+
}
|
|
70109
|
+
}
|
|
70110
|
+
return style;
|
|
70111
|
+
};
|
|
70043
70112
|
;// CONCATENATED MODULE: ../base/src/table/tr.tsx
|
|
70044
70113
|
|
|
70045
70114
|
|
|
@@ -70059,8 +70128,6 @@ function Td(props) {
|
|
|
70059
70128
|
|
|
70060
70129
|
|
|
70061
70130
|
|
|
70062
|
-
|
|
70063
|
-
var tr_toNum = toNum;
|
|
70064
70131
|
var Tr = function Tr(props) {
|
|
70065
70132
|
var _props$rowClassName;
|
|
70066
70133
|
var treeFunc = props.treeFunc,
|
|
@@ -70070,29 +70137,9 @@ var Tr = function Tr(props) {
|
|
|
70070
70137
|
var expandRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
70071
70138
|
var config = useConfig();
|
|
70072
70139
|
var isRtl = config.direction === 'rtl';
|
|
70073
|
-
var getFixedStyle = function getFixedStyle(fixed, index, colSpan) {
|
|
70074
|
-
if (!props.isScrollX) return;
|
|
70075
|
-
if (fixed === 'left') {
|
|
70076
|
-
var left = props.colgroup.slice(0, index).reduce(function (a, b) {
|
|
70077
|
-
return tr_toNum(a) + tr_toNum(b);
|
|
70078
|
-
}, 0);
|
|
70079
|
-
return defineProperty_default()({
|
|
70080
|
-
position: 'sticky'
|
|
70081
|
-
}, isRtl ? 'right' : 'left', left);
|
|
70082
|
-
}
|
|
70083
|
-
if (fixed === 'right') {
|
|
70084
|
-
var right = props.colgroup.slice(index + colSpan).reduce(function (a, b) {
|
|
70085
|
-
return tr_toNum(a) + tr_toNum(b);
|
|
70086
|
-
}, 0);
|
|
70087
|
-
return defineProperty_default()({
|
|
70088
|
-
position: 'sticky'
|
|
70089
|
-
}, isRtl ? 'left' : 'right', right);
|
|
70090
|
-
}
|
|
70091
|
-
return undefined;
|
|
70092
|
-
};
|
|
70093
70140
|
var getTdStyle = function getTdStyle(column, colSpan) {
|
|
70094
|
-
|
|
70095
|
-
var fixedStyle =
|
|
70141
|
+
// 固定列偏移引用 table 上的 CSS 变量,列宽/横向滚动状态变化时行无需重渲染
|
|
70142
|
+
var fixedStyle = getCellFixedStyle(column.fixed, column.index, colSpan, props.columns.length, isRtl);
|
|
70096
70143
|
if (!fixedStyle && !column.style) return;
|
|
70097
70144
|
return objectSpread2_default()(objectSpread2_default()({}, column.style), fixedStyle);
|
|
70098
70145
|
};
|
|
@@ -70132,40 +70179,23 @@ var Tr = function Tr(props) {
|
|
|
70132
70179
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
70133
70180
|
isExpandLoading = _useState2[0],
|
|
70134
70181
|
setIsExpandLoading = _useState2[1];
|
|
70135
|
-
|
|
70136
|
-
|
|
70137
|
-
|
|
70138
|
-
|
|
70139
|
-
|
|
70140
|
-
|
|
70141
|
-
|
|
70142
|
-
|
|
70143
|
-
|
|
70144
|
-
|
|
70145
|
-
|
|
70146
|
-
|
|
70147
|
-
|
|
70148
|
-
|
|
70149
|
-
|
|
70150
|
-
|
|
70151
|
-
|
|
70152
|
-
setIsExpandLoading(false);
|
|
70153
|
-
return _context.finish(6);
|
|
70154
|
-
case 9:
|
|
70155
|
-
_context.next = 12;
|
|
70156
|
-
break;
|
|
70157
|
-
case 11:
|
|
70158
|
-
treeFunc.handleTreeExpand(props.rawData, props.rowIndex);
|
|
70159
|
-
case 12:
|
|
70160
|
-
case "end":
|
|
70161
|
-
return _context.stop();
|
|
70162
|
-
}
|
|
70163
|
-
}, _callee, null, [[2,, 6, 9]]);
|
|
70164
|
-
}));
|
|
70165
|
-
return function (_x) {
|
|
70166
|
-
return _ref3.apply(this, arguments);
|
|
70167
|
-
};
|
|
70168
|
-
}());
|
|
70182
|
+
|
|
70183
|
+
// 不使用 async 函数:编译产物会在每次渲染时为每一行创建 regenerator 状态机,大数据量下开销可观
|
|
70184
|
+
var innerExpandClick = usePersistFn(function (showLoader) {
|
|
70185
|
+
var loader = props.loader;
|
|
70186
|
+
if (showLoader && loader && typeof loader === 'function') {
|
|
70187
|
+
setIsExpandLoading(true);
|
|
70188
|
+
// new Promise 包裹:loader 同步抛错或返回非 Promise 时,与原 await 写法行为一致
|
|
70189
|
+
return new Promise(function (resolve) {
|
|
70190
|
+
resolve(loader(props.rawData, props.rowIndex));
|
|
70191
|
+
}).then(function () {
|
|
70192
|
+
treeFunc.handleTreeExpand(props.rawData, props.rowIndex);
|
|
70193
|
+
}).finally(function () {
|
|
70194
|
+
setIsExpandLoading(false);
|
|
70195
|
+
});
|
|
70196
|
+
}
|
|
70197
|
+
treeFunc.handleTreeExpand(props.rawData, props.rowIndex);
|
|
70198
|
+
});
|
|
70169
70199
|
var renderTreeExpand = function renderTreeExpand(content) {
|
|
70170
70200
|
var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
|
|
70171
70201
|
var level = props.treeExpandLevel.get(props.originKey) || 0;
|
|
@@ -70507,7 +70537,19 @@ var isTrPropsEqual = function isTrPropsEqual(prev, next) {
|
|
|
70507
70537
|
|
|
70508
70538
|
|
|
70509
70539
|
|
|
70510
|
-
|
|
70540
|
+
var hasExpandColumn = function hasExpandColumn(props) {
|
|
70541
|
+
return !!props.expandHideCol || (props.columns || []).some(function (col) {
|
|
70542
|
+
return col.type === 'expand' || col.type === 'row-expand';
|
|
70543
|
+
});
|
|
70544
|
+
};
|
|
70545
|
+
|
|
70546
|
+
// bodyScrollWidth / resizeFlag 在行内只用于虚拟列表上报行高;
|
|
70547
|
+
// 展开行渲染时会读取容器宽度下发给嵌套表格,有展开列时也需要随之重渲染。
|
|
70548
|
+
// 其余场景不再下发,Table 布局状态变化时 Tbody / Tr 都可以跳过渲染
|
|
70549
|
+
var needLayoutProps = function needLayoutProps(props) {
|
|
70550
|
+
return !!props.virtual || hasExpandColumn(props);
|
|
70551
|
+
};
|
|
70552
|
+
var Tbody = function Tbody(props) {
|
|
70511
70553
|
var _jssStyle$table, _jssStyle$input, _jssStyle$select, _jssStyle$datePicker, _jssStyle$treeSelect, _jssStyle$switch, _jssStyle$checkbox, _jssStyle$radio, _jssStyle$cascader;
|
|
70512
70554
|
var _props$columns = props.columns,
|
|
70513
70555
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
@@ -70516,6 +70558,7 @@ var isTrPropsEqual = function isTrPropsEqual(prev, next) {
|
|
|
70516
70558
|
currentColIndex = props.currentColIndex,
|
|
70517
70559
|
_props$hover = props.hover,
|
|
70518
70560
|
hover = _props$hover === void 0 ? true : _props$hover;
|
|
70561
|
+
var passLayout = needLayoutProps(props);
|
|
70519
70562
|
var _useTableExpand = use_table_expand({
|
|
70520
70563
|
columns: props.columns,
|
|
70521
70564
|
expandKeys: props.expandKeys,
|
|
@@ -70564,11 +70607,9 @@ var isTrPropsEqual = function isTrPropsEqual(prev, next) {
|
|
|
70564
70607
|
originKey: originKey,
|
|
70565
70608
|
row: rowData[index],
|
|
70566
70609
|
columns: columns,
|
|
70567
|
-
isScrollX: props.isScrollX,
|
|
70568
70610
|
jssStyle: props.jssStyle,
|
|
70569
70611
|
tableClasses: tableClasses,
|
|
70570
70612
|
preventClasses: preventClasses,
|
|
70571
|
-
colgroup: props.colgroup,
|
|
70572
70613
|
rowClassName: props.rowClassName,
|
|
70573
70614
|
rawData: item,
|
|
70574
70615
|
rowIndex: rowIndex,
|
|
@@ -70597,9 +70638,9 @@ var isTrPropsEqual = function isTrPropsEqual(prev, next) {
|
|
|
70597
70638
|
onRowClick: props.onRowClick,
|
|
70598
70639
|
rowEvents: props.rowEvents,
|
|
70599
70640
|
disabled: props.datum.disabledCheck(item),
|
|
70600
|
-
bodyScrollWidth: props.bodyScrollWidth,
|
|
70641
|
+
bodyScrollWidth: passLayout ? props.bodyScrollWidth : undefined,
|
|
70601
70642
|
scrollRef: props.scrollRef,
|
|
70602
|
-
resizeFlag: props.resizeFlag,
|
|
70643
|
+
resizeFlag: passLayout ? props.resizeFlag : undefined,
|
|
70603
70644
|
treeCheckAll: props.treeCheckAll,
|
|
70604
70645
|
onCellClick: props.onCellClick,
|
|
70605
70646
|
virtual: props.virtual,
|
|
@@ -70617,17 +70658,32 @@ var isTrPropsEqual = function isTrPropsEqual(prev, next) {
|
|
|
70617
70658
|
return renderRow(item, index);
|
|
70618
70659
|
})
|
|
70619
70660
|
});
|
|
70620
|
-
|
|
70621
|
-
|
|
70622
|
-
|
|
70623
|
-
|
|
70624
|
-
|
|
70625
|
-
|
|
70626
|
-
|
|
70627
|
-
});
|
|
70628
|
-
}
|
|
70629
|
-
|
|
70630
|
-
|
|
70661
|
+
|
|
70662
|
+
// 未传 shouldUpdate 时直接返回最新结果,非 lazy 模式下行为与不做缓存一致
|
|
70663
|
+
return useComponentMemo(function () {
|
|
70664
|
+
return $tbody;
|
|
70665
|
+
}, [currentRowIndex, currentColIndex, props.data], props.virtual === 'lazy' ? function (prev, next) {
|
|
70666
|
+
return prev.some(function (_, index) {
|
|
70667
|
+
return !shallow_equal_shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
70668
|
+
}) || !props.scrolling;
|
|
70669
|
+
} : undefined);
|
|
70670
|
+
};
|
|
70671
|
+
|
|
70672
|
+
// 语义化样式每次渲染都会生成新对象,按内容比较
|
|
70673
|
+
var SEM_STYLE_KEYS = ['bodyRowSemStyle', 'bodyCellSemStyle'];
|
|
70674
|
+
var LAYOUT_KEYS = ['bodyScrollWidth', 'resizeFlag'];
|
|
70675
|
+
|
|
70676
|
+
// 仅在开启 rowMemo 时生效,未开启时始终返回 false,行为与不做 memo 完全一致。
|
|
70677
|
+
// rowMemo 下 Tbody 的 props 不变时,下发给每一行的 props 也不变,行本来就会被 Tr 的 memo 跳过;
|
|
70678
|
+
// 在 Tbody 这层直接跳过,省去 Table 自身布局状态(列宽测量、横向滚动、滚动阴影等)变化时逐行生成元素和比较 props 的开销
|
|
70679
|
+
var isTbodyPropsEqual = function isTbodyPropsEqual(prev, next) {
|
|
70680
|
+
if (!prev.rowMemo || !next.rowMemo) return false;
|
|
70681
|
+
var skip = needLayoutProps(next) ? SEM_STYLE_KEYS : [].concat(SEM_STYLE_KEYS, LAYOUT_KEYS);
|
|
70682
|
+
return shallow_equal_shallowEqual(prev, next, {
|
|
70683
|
+
skip: skip
|
|
70684
|
+
}) && shallow_equal_shallowEqual(prev.bodyRowSemStyle, next.bodyRowSemStyle) && shallow_equal_shallowEqual(prev.bodyCellSemStyle, next.bodyCellSemStyle);
|
|
70685
|
+
};
|
|
70686
|
+
/* harmony default export */ var tbody = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().memo(Tbody, isTbodyPropsEqual));
|
|
70631
70687
|
;// CONCATENATED MODULE: ../base/src/table/tfoot.tsx
|
|
70632
70688
|
|
|
70633
70689
|
|
|
@@ -70768,6 +70824,7 @@ var table_excluded = ["data"];
|
|
|
70768
70824
|
|
|
70769
70825
|
|
|
70770
70826
|
|
|
70827
|
+
|
|
70771
70828
|
|
|
70772
70829
|
var table_devUseWarning = devUseWarning;
|
|
70773
70830
|
var table_emptyArr = [];
|
|
@@ -71124,6 +71181,10 @@ function Table(props) {
|
|
|
71124
71181
|
tableLayout: 'fixed'
|
|
71125
71182
|
};
|
|
71126
71183
|
}, [width]);
|
|
71184
|
+
// 表体所在的 table 额外声明固定列偏移的 CSS 变量,单元格只引用变量
|
|
71185
|
+
var bodyTableStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
71186
|
+
return objectSpread2_default()(objectSpread2_default()({}, tableStyle), getFixedVarsStyle(columns, colgroup, isScrollX));
|
|
71187
|
+
}, [tableStyle, columns, colgroup, isScrollX]);
|
|
71127
71188
|
var renderTable = function renderTable() {
|
|
71128
71189
|
var _props$summary, _sticky$top, _props$data2;
|
|
71129
71190
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
@@ -71141,8 +71202,6 @@ function Table(props) {
|
|
|
71141
71202
|
data: treeData,
|
|
71142
71203
|
treeExpandLevel: treeExpandLevel,
|
|
71143
71204
|
treeFunc: treeFunc,
|
|
71144
|
-
colgroup: colgroup,
|
|
71145
|
-
isScrollX: isScrollX,
|
|
71146
71205
|
expandHideCol: expandHideCol,
|
|
71147
71206
|
keygen: props.keygen,
|
|
71148
71207
|
rowClassName: props.rowClassName,
|
|
@@ -71350,7 +71409,7 @@ function Table(props) {
|
|
|
71350
71409
|
},
|
|
71351
71410
|
children: $headTable
|
|
71352
71411
|
}), !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
71353
|
-
style: objectSpread2_default()(objectSpread2_default()({},
|
|
71412
|
+
style: objectSpread2_default()(objectSpread2_default()({}, bodyTableStyle), {}, {
|
|
71354
71413
|
transform: virtualInfo.translateStyle
|
|
71355
71414
|
}),
|
|
71356
71415
|
ref: tbodyRef,
|
|
@@ -71380,7 +71439,7 @@ function Table(props) {
|
|
|
71380
71439
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
71381
71440
|
onScroll: handleBodyScroll,
|
|
71382
71441
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
71383
|
-
style:
|
|
71442
|
+
style: bodyTableStyle,
|
|
71384
71443
|
ref: tbodyRef,
|
|
71385
71444
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
71386
71445
|
})
|
|
@@ -71411,7 +71470,7 @@ function Table(props) {
|
|
|
71411
71470
|
tableRef: tableRef,
|
|
71412
71471
|
setFakeVirtual: scrollAble ? undefined : setFakeVirtual,
|
|
71413
71472
|
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data5 = props.data) !== null && _props$data5 !== void 0 && _props$data5.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
71414
|
-
style: objectSpread2_default()(objectSpread2_default()({},
|
|
71473
|
+
style: objectSpread2_default()(objectSpread2_default()({}, bodyTableStyle), {}, {
|
|
71415
71474
|
transform: virtualInfo.translateStyle
|
|
71416
71475
|
}),
|
|
71417
71476
|
ref: tbodyRef,
|
|
@@ -71442,7 +71501,7 @@ function Table(props) {
|
|
|
71442
71501
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
71443
71502
|
onScroll: handleBodyScroll,
|
|
71444
71503
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
71445
|
-
style:
|
|
71504
|
+
style: bodyTableStyle,
|
|
71446
71505
|
ref: tbodyRef,
|
|
71447
71506
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
71448
71507
|
columns: columns,
|
|
@@ -80284,7 +80343,7 @@ var watermark_interface = __webpack_require__(6640);
|
|
|
80284
80343
|
|
|
80285
80344
|
|
|
80286
80345
|
/* harmony default export */ var src_0 = ({
|
|
80287
|
-
version: '3.10.3-beta.
|
|
80346
|
+
version: '3.10.3-beta.5'
|
|
80288
80347
|
});
|
|
80289
80348
|
}();
|
|
80290
80349
|
/******/ return __webpack_exports__;
|