fix: form action dragging area is too large (#1628)

This commit is contained in:
Dunqing 2023-04-02 07:11:01 +08:00 committed by GitHub
parent f5171ce6e7
commit ecdd46bf83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,18 +13,20 @@ export const ActionBar = observer((props: any) => {
const { designable } = useDesignable();
if (layout === 'one-column') {
return (
<div style={{ display: 'flex', ...style }} {...others}>
{props.children && (
<div style={{ marginRight: 8 }}>
<Space>
{fieldSchema.mapProperties((schema, key) => {
return <RecursionField key={key} name={key} schema={schema} />;
})}
</Space>
</div>
)}
{render()}
</div>
<DndContext>
<div style={{ display: 'flex', ...style }} {...others}>
{props.children && (
<div style={{ marginRight: 8 }}>
<Space>
{fieldSchema.mapProperties((schema, key) => {
return <RecursionField key={key} name={key} schema={schema} />;
})}
</Space>
</div>
)}
{render()}
</div>
</DndContext>
);
}
const hasActions = Object.keys(fieldSchema.properties ?? {}).length > 0;