zmdms-webui 1.8.4 → 1.8.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.
@@ -249,7 +249,7 @@ function exportToExcelSimple(records, config) {
249
249
  * excel导出
250
250
  */
251
251
  function useExcelExport(records, config) {
252
- var columns = config.columns, fileName = config.fileName, isAutoMerge = config.isAutoMerge, columnHeaders = config.columnHeaders;
252
+ var columns = config.columns, isAutoMerge = config.isAutoMerge, columnHeaders = config.columnHeaders;
253
253
  // 计算需要合并的字段key集合
254
254
  var mergeKeys = useMergeKeys(columns, isAutoMerge);
255
255
  // 需要合计的字段
@@ -258,7 +258,7 @@ function useExcelExport(records, config) {
258
258
  .filter(function (item) { return item.isSummary; })
259
259
  .map(function (item) { return item.dataIndex; });
260
260
  }, [columns]);
261
- var exportFunction = useMemoizedFn(function () {
261
+ var exportFunction = useMemoizedFn(function (fileName) {
262
262
  exportToExcelSimple(records, {
263
263
  columns: columns,
264
264
  mergeKeys: mergeKeys,
@@ -277,7 +277,7 @@ interface ITableRefHandel {
277
277
  /**
278
278
  * 导出excel
279
279
  */
280
- exportExcel?: () => void;
280
+ exportExcel?: (fileName: string) => void;
281
281
  }
282
282
  interface ITableProps<RecordType> extends Omit<TableProps<RecordType>, "columns"> {
283
283
  /**
@@ -246,7 +246,6 @@ var Table = function (props) {
246
246
  var exportExcel = useExcelExport(newDataSource, {
247
247
  columns: newColumns,
248
248
  isAutoMerge: isAutoMerge,
249
- fileName: "导出.xlsx",
250
249
  });
251
250
  // 暴露给外部一些方法
252
251
  useImperativeHandle(tableRefHandle, function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "1.8.4",
3
+ "version": "1.8.5",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",