Skip to content

Commit

Permalink
fix: export columns重构
Browse files Browse the repository at this point in the history
  • Loading branch information
greper committed Oct 26, 2023
1 parent 0f92a05 commit 3252095
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/fast-crud/src/lib/fs-export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,22 @@ export async function exportTable(crudExpose: CrudExpose, opts: ExportProps = {}
if (col.exportable !== false && col.key !== "_index") {
const exportCol: ExportColumn = {
key: col.key,
title: col.title,
columnProps: col
title: col.title
};
//构建列配置
if (opts.columnBuilder) {
opts.columnBuilder({ col: exportCol });
}
columns.push(exportCol);
}
});
}

for (const exportCol of columns) {
//构建列配置
const columnProps = crudBinding.value.table.columnsMap[exportCol.key];
exportCol.columnProps = columnProps || {};
if (opts.columnBuilder) {
opts.columnBuilder({ col: exportCol });
}
}

//加载异步组件,不影响首页加载速度
const exportUtil: ExportUtil = await loadFsExportUtil();
const data = [];
Expand Down

0 comments on commit 3252095

Please sign in to comment.