feat(table): 新增createColumns函数

This commit is contained in:
roymondchen 2024-09-05 14:13:11 +08:00 committed by roymondchen
parent 8cd2962b4b
commit 6fd30242c0

View File

@ -18,7 +18,7 @@
import { datetimeFormatter } from '@tmagic/form';
import { ColumnConfig } from './schema';
import type { ColumnConfig } from './schema';
export const formatter = (item: ColumnConfig, row: any) => {
if (!item.prop) return '';
@ -37,3 +37,5 @@ export const formatter = (item: ColumnConfig, row: any) => {
return row[item.prop];
}
};
export const createColumns = (columns: ColumnConfig[]) => columns;