zmdms-webui 2.9.5 → 2.9.7
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/dist/es/table/hooks.js
CHANGED
|
@@ -27,7 +27,12 @@ function useTableSummaryCollapse(tableRef, isDefaultShow, isCollapseEnable) {
|
|
|
27
27
|
};
|
|
28
28
|
}, [tableRef, isCollapseEnable]);
|
|
29
29
|
var renderTableSummaryCollapse = useMemoizedFn(function () {
|
|
30
|
-
var
|
|
30
|
+
var _a;
|
|
31
|
+
if (!tableWidthRef.current) {
|
|
32
|
+
// 兜底是因为,当在tabs中 使用 forceRender时,第一次渲染时,tableRef可能还没有值
|
|
33
|
+
tableWidthRef.current = ((_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) || 0;
|
|
34
|
+
}
|
|
35
|
+
var tableWidth = tableWidthRef.current || window.innerWidth;
|
|
31
36
|
return (jsx(Table.Summary.Row, __assign({ className: "ztxk-table-summary-collapse",
|
|
32
37
|
// 这里不能设置高度,当表格属性 有 tableLayout: 'auto'时,宽度会有问题
|
|
33
38
|
// style={{ width: `${tableWidth - 15}px` }}
|