zmdms-webui 2.7.0 → 2.7.2
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.
|
@@ -143,7 +143,7 @@ interface ICanvasColumnType<RecordType = any> {
|
|
|
143
143
|
* @param values 所有值的数组
|
|
144
144
|
* @returns 计算后的合计值
|
|
145
145
|
*/
|
|
146
|
-
totalCalcCallback?: (value:
|
|
146
|
+
totalCalcCallback?: (value: string | number | undefined, values: Record<string, any>) => any;
|
|
147
147
|
/**
|
|
148
148
|
* 开启合并的字段,按其他字段维度合并
|
|
149
149
|
*/
|
|
@@ -240,7 +240,7 @@ interface IExpandable<RecordType = any> {
|
|
|
240
240
|
/**
|
|
241
241
|
* 展开状态改变时的回调
|
|
242
242
|
*/
|
|
243
|
-
onExpandedRowsChange?: (expandedKeys: React__default.Key[], row: RecordType, action:
|
|
243
|
+
onExpandedRowsChange?: (expandedKeys: React__default.Key[], row: RecordType, action: "expand" | "collapse") => void;
|
|
244
244
|
/**
|
|
245
245
|
* 是否默认展开所有行
|
|
246
246
|
*/
|
package/dist/es/table/excel.js
CHANGED
|
@@ -92,7 +92,7 @@ function exportToExcelWithMergeAndComments(records, columns, mergeKeys, numKeys,
|
|
|
92
92
|
var key = col.dataIndex;
|
|
93
93
|
if (col.isSummary && sumsByKey_1[key] !== undefined) {
|
|
94
94
|
if (col.totalCalcCallback) {
|
|
95
|
-
sumsByKey_1[key] = col.totalCalcCallback(sumsByKey_1,
|
|
95
|
+
sumsByKey_1[key] = col.totalCalcCallback(sumsByKey_1[key], sumsByKey_1);
|
|
96
96
|
}
|
|
97
97
|
return sumsByKey_1[key];
|
|
98
98
|
}
|
package/dist/es/table/hooks.js
CHANGED
|
@@ -68,6 +68,12 @@ function useMoveRowChange(dataSourceRef, onTableChange, options) {
|
|
|
68
68
|
var onContextMenuCapture = function (e) {
|
|
69
69
|
var _a;
|
|
70
70
|
(_a = defaultOnRow === null || defaultOnRow === void 0 ? void 0 : defaultOnRow.onContextMenuCapture) === null || _a === void 0 ? void 0 : _a.call(defaultOnRow, e);
|
|
71
|
+
// 检查事件目标是否在 Modal 或其他浮层组件内
|
|
72
|
+
var target = e.target;
|
|
73
|
+
var isInModal = target.closest('.ant-modal-wrap, .ant-modal-root');
|
|
74
|
+
if (isInModal) {
|
|
75
|
+
return; // 如果在 Modal 内,不显示右键菜单
|
|
76
|
+
}
|
|
71
77
|
menuShow === null || menuShow === void 0 ? void 0 : menuShow({
|
|
72
78
|
event: e,
|
|
73
79
|
});
|
|
@@ -95,6 +101,12 @@ function useMoveRowChange(dataSourceRef, onTableChange, options) {
|
|
|
95
101
|
var onContextMenuCapture = function (e) {
|
|
96
102
|
var _a;
|
|
97
103
|
(_a = extra === null || extra === void 0 ? void 0 : extra.onContextMenuCapture) === null || _a === void 0 ? void 0 : _a.call(extra, e);
|
|
104
|
+
// 检查事件目标是否在 Modal 或其他浮层组件内
|
|
105
|
+
var target = e.target;
|
|
106
|
+
var isInModal = target.closest('.ant-modal-wrap, .ant-modal-root');
|
|
107
|
+
if (isInModal) {
|
|
108
|
+
return; // 如果在 Modal 内,不显示右键菜单
|
|
109
|
+
}
|
|
98
110
|
menuShow === null || menuShow === void 0 ? void 0 : menuShow({
|
|
99
111
|
event: e,
|
|
100
112
|
});
|