diff --git a/packages/drip-table-generator/src/layouts/utils.ts b/packages/drip-table-generator/src/layouts/utils.ts index d961d1bba..2ee0beb59 100644 --- a/packages/drip-table-generator/src/layouts/utils.ts +++ b/packages/drip-table-generator/src/layouts/utils.ts @@ -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[] || []).map((partItem) => { + const parts = (schemaItem.options.parts as Record[] || []).map((partItem) => { delete partItem.dataIndexMode; return { ...partItem, }; }); + schemaItem.options = { ...schemaItem.options, parts }; } return schemaItem; });