zmdms-webui 1.8.8 → 1.9.0
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.
|
@@ -228,7 +228,7 @@ interface IColumnType<RecordType> extends Omit<ColumnType<RecordType>, "render">
|
|
|
228
228
|
/**
|
|
229
229
|
* 添加角标
|
|
230
230
|
*/
|
|
231
|
-
badge?: IBadgeProps | ((record: any) => IBadgeProps);
|
|
231
|
+
badge?: IBadgeProps | ((record: any) => IBadgeProps | undefined);
|
|
232
232
|
}
|
|
233
233
|
interface IRenderOptions {
|
|
234
234
|
insertTableFromClipboard: IFuncInsertTableFromClipboard;
|
|
@@ -2,7 +2,7 @@ import { __assign } from '../_virtual/_tslib.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
4
|
import { Table } from 'antd';
|
|
5
|
-
import { plus } from 'zmdms-utils';
|
|
5
|
+
import { plus, addThousedSeparator } from 'zmdms-utils';
|
|
6
6
|
import { IS_SUMMARY } from './constant.js';
|
|
7
7
|
|
|
8
8
|
function useSummary(summaryConfig, columns, options) {
|
|
@@ -144,6 +144,10 @@ function getSubtotalObj(fields, dataSource) {
|
|
|
144
144
|
summaryTotalObj[field] = summaryItem
|
|
145
145
|
? plus(summaryItem, dataItem)
|
|
146
146
|
: dataItem;
|
|
147
|
+
// 合计添加千分符
|
|
148
|
+
if (summaryTotalObj[field]) {
|
|
149
|
+
summaryTotalObj[field] = addThousedSeparator(summaryTotalObj[field]);
|
|
150
|
+
}
|
|
147
151
|
}
|
|
148
152
|
else {
|
|
149
153
|
var key = field.key, showKey = field.showKey, toFixedNum_1 = field.toFixedNum, value = field.value, callback = field.callback;
|
|
@@ -236,6 +240,10 @@ function getSubtotalObj(fields, dataSource) {
|
|
|
236
240
|
summaryTotalConfigObj[key] = {
|
|
237
241
|
align: field === null || field === void 0 ? void 0 : field.align,
|
|
238
242
|
};
|
|
243
|
+
// 合计添加千分符
|
|
244
|
+
if (summaryTotalObj[key]) {
|
|
245
|
+
summaryTotalObj[key] = addThousedSeparator(summaryTotalObj[key]);
|
|
246
|
+
}
|
|
239
247
|
}
|
|
240
248
|
});
|
|
241
249
|
});
|