Skip to content

Commit

Permalink
feat(table): 新增createColumns函数
Browse files Browse the repository at this point in the history
  • Loading branch information
roymondchen committed Sep 14, 2024
1 parent b9f2065 commit 540239a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/table/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Expand All @@ -37,3 +37,5 @@ export const formatter = (item: ColumnConfig, row: any) => {
return row[item.prop];
}
};

export const createColumns = (columns: ColumnConfig[]) => columns;

0 comments on commit 540239a

Please sign in to comment.