Skip to content

Commit

Permalink
fix: generator get column assign options
Browse files Browse the repository at this point in the history
  • Loading branch information
helloqian12138 committed May 23, 2024
1 parent d4631ab commit eef8995
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/drip-table-generator/src/layouts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,16 @@ const getColumns = (columns: DTGTableConfig['columns']) => columns.map((item) =>
if (!Object.isExtensible(schemaItem.options)) {
schemaItem.options = { ...schemaItem.options };
}
schemaItem.options.items = items;
schemaItem.options = { ...schemaItem.options, items };
}
if (schemaItem.component === 'text' && schemaItem.options.parts) {
schemaItem.options.parts = (schemaItem.options.parts as Record<string, unknown>[] || []).map((partItem) => {
const parts = (schemaItem.options.parts as Record<string, unknown>[] || []).map((partItem) => {
delete partItem.dataIndexMode;
return {
...partItem,
};
});
schemaItem.options = { ...schemaItem.options, parts };
}
return schemaItem;
});
Expand Down

0 comments on commit eef8995

Please sign in to comment.