zmdms-webui 2.2.7 → 2.2.9
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
|
@@ -490,7 +490,7 @@ function useMergeAddAndDel(_a) {
|
|
|
490
490
|
*/
|
|
491
491
|
var newRowSelection = useMemo(function () {
|
|
492
492
|
if (isAutoMerge && rowSelection && isAutoMergeAddAndDel) {
|
|
493
|
-
|
|
493
|
+
var rows = __assign(__assign({}, rowSelection), {
|
|
494
494
|
// 关键:合并行时,勾选框只显示在rowSpan>0的单元格
|
|
495
495
|
renderCell: function (_v, record, _i, originNode) {
|
|
496
496
|
var _a;
|
|
@@ -501,6 +501,7 @@ function useMergeAddAndDel(_a) {
|
|
|
501
501
|
children: originNode,
|
|
502
502
|
};
|
|
503
503
|
} });
|
|
504
|
+
return rows;
|
|
504
505
|
}
|
|
505
506
|
return rowSelection;
|
|
506
507
|
}, [rowSelection, isAutoMerge, firstMergeKey, isAutoMergeAddAndDel]);
|
package/dist/es/table/table.js
CHANGED
|
@@ -11,7 +11,7 @@ import './components/ColumnAddDel.js';
|
|
|
11
11
|
import './components/TitleOperation.js';
|
|
12
12
|
import { IS_SUMMARY, TABLE_DYNAMIC_KEY, INNER_TABLE_PAGINATION_POSITION, INNER_TABLE_PAGINATION_PAGESIZEOPTIONS } from './constant.js';
|
|
13
13
|
import './components/PopoverIcon.js';
|
|
14
|
-
import { useLatest } from 'ahooks';
|
|
14
|
+
import { useLatest, useMemoizedFn } from 'ahooks';
|
|
15
15
|
import { useParseColumns } from './useParseColumns.js';
|
|
16
16
|
import { useColumns } from './useColumns.js';
|
|
17
17
|
import { useDynamicListByColumns } from './useDynamicListByColumns.js';
|
|
@@ -328,12 +328,22 @@ var Table = function (props) {
|
|
|
328
328
|
toggleFullScreen: function () { var _a; return (_a = tableMenuRef.current) === null || _a === void 0 ? void 0 : _a.toggleFullscreen(); },
|
|
329
329
|
};
|
|
330
330
|
});
|
|
331
|
+
// 全屏的一些方法
|
|
332
|
+
var _z = useState(false), isFull = _z[0], setIsFull = _z[1];
|
|
333
|
+
var fullscreenHandle = useMemoizedFn(function (isFull) {
|
|
334
|
+
isFullscreenHandle === null || isFullscreenHandle === void 0 ? void 0 : isFullscreenHandle(isFull);
|
|
335
|
+
setIsFull(isFull);
|
|
336
|
+
});
|
|
331
337
|
// 表格
|
|
332
338
|
var SingleTable = (jsx(Table$1, __assign({ className: classes, bordered: bordered, dataSource: newDataSource, columns: newColumns, components: componentsMemo, onRow: onRow, summary: getSummaryHandle, rowSelection: newRowSelection, pagination: isInnerPagination
|
|
333
339
|
? pagination
|
|
334
340
|
? pagination
|
|
335
341
|
: paginationConfig
|
|
336
|
-
: pagination, rowClassName: rowClassName, scroll: proxyScroll
|
|
342
|
+
: pagination, rowClassName: rowClassName, scroll: proxyScroll, getPopupContainer: isFull
|
|
343
|
+
? function () {
|
|
344
|
+
return document.querySelector(".ztxk-table--fullscreen") || document.body;
|
|
345
|
+
}
|
|
346
|
+
: undefined }, resetProps)));
|
|
337
347
|
return (jsxs("div", __assign({ style: isFlex
|
|
338
348
|
? {
|
|
339
349
|
position: "relative",
|
|
@@ -349,7 +359,7 @@ var Table = function (props) {
|
|
|
349
359
|
overflow: "hidden",
|
|
350
360
|
marginTop: isMarginTop ? 10 : 0,
|
|
351
361
|
marginBottom: isMarginBottom ? 10 : 0,
|
|
352
|
-
}, ref: tableRef, id: tableId, className: "ztxk-table--wrapper-container" }, { children: [isMove ? (jsx(DndProvider, __assign({ backend: HTML5Backend, context: window }, { children: SingleTable }))) : (SingleTable), dynamicKey ? (jsx(DynamicSetting, { parentDynamicKey: TABLE_DYNAMIC_KEY, dynamicKey: dynamicKey, defaultList: defaultDynamicList, onCurrentListChange: onCurrentListChange, ref: dynamicSettingRef, hiddenOperationIcon: true, isMore: true, isFixed: true, isDimensionDynamic: isDimensionDynamic })) : null, menuId ? (jsx(TableMenu, { menuId: menuId, tableRef: tableRef, isFullscreenHandle:
|
|
362
|
+
}, ref: tableRef, id: tableId, className: "ztxk-table--wrapper-container" }, { children: [isMove ? (jsx(DndProvider, __assign({ backend: HTML5Backend, context: window }, { children: SingleTable }))) : (SingleTable), dynamicKey ? (jsx(DynamicSetting, { parentDynamicKey: TABLE_DYNAMIC_KEY, dynamicKey: dynamicKey, defaultList: defaultDynamicList, onCurrentListChange: onCurrentListChange, ref: dynamicSettingRef, hiddenOperationIcon: true, isMore: true, isFixed: true, isDimensionDynamic: isDimensionDynamic })) : null, menuId ? (jsx(TableMenu, { menuId: menuId, tableRef: tableRef, isFullscreenHandle: fullscreenHandle, tableMenuRef: tableMenuRef })) : null] })));
|
|
353
363
|
};
|
|
354
364
|
var MemoTable = memo(Table);
|
|
355
365
|
MemoTable.displayName = "ZTXK_WEBUI_Table";
|