From ea90d79bcffacb4feecdbaeb0aa766f0d4b49967 Mon Sep 17 00:00:00 2001 From: helloqian12138 Date: Sat, 9 Nov 2024 15:00:09 +0800 Subject: [PATCH] fix: generator popover add popover error and group style error --- .../editable-table/components/cell/group.tsx | 2 +- .../editable-table/components/components-selector/index.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/cell/group.tsx b/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/cell/group.tsx index 4dedc62a7..b13456a58 100644 --- a/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/cell/group.tsx +++ b/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/cell/group.tsx @@ -109,7 +109,7 @@ function GroupCell< empty: !itemColumnSchema, })} style={{ - ...itemColumn && 'style' in itemColumn && 'schema' in itemColumn ? itemColumn.style : {}, + ...itemColumn && 'style' in itemColumn && 'schema' in itemColumn && typeof itemColumn.style === 'object' ? itemColumn.style : {}, minWidth: `${100 / colLength}%`, justifyContent: options.horizontalAlign, }} diff --git a/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/components-selector/index.tsx b/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/components-selector/index.tsx index 58f0abed8..7cb45e223 100644 --- a/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/components-selector/index.tsx +++ b/packages/drip-table-generator/src/layouts/table-workstation/editable-table/components/components-selector/index.tsx @@ -128,7 +128,7 @@ ExtraOptions extends Partial = never, showFilter={props.showFilter} floatPanel value={popoverConfig?.['ui:type']} - options={components.map(item => ({ + options={components.filter(item => item['ui:type'] !== 'popover').map(item => ({ label: item.title, value: item['ui:type'], group: item.group, @@ -149,7 +149,7 @@ ExtraOptions extends Partial = never, showFilter={props.showFilter} floatPanel value={contentConfig?.['ui:type']} - options={components.map(item => ({ + options={components.filter(item => item['ui:type'] !== 'popover').map(item => ({ label: item.title, value: item['ui:type'], group: item.group,