import { observer, RecursionField, useFieldSchema } from '@formily/react'; import { Space } from 'antd'; import React from 'react'; import { useSchemaInitializer } from '../../../schema-initializer'; import { DndContext } from '../../common'; export const ActionBar = observer((props: any) => { const { layout = 'tow-columns', style, ...others } = props; const fieldSchema = useFieldSchema(); const { render } = useSchemaInitializer(fieldSchema['x-initializer']); if (layout === 'one-column') { return (
{props.children && (
{fieldSchema.mapProperties((schema, key) => { return ; })}
)} {render()}
); } return (
{fieldSchema.mapProperties((schema, key) => { if (schema['x-align'] !== 'left') { return null; } return ; })} {fieldSchema.mapProperties((schema, key) => { if (schema['x-align'] === 'left') { return null; } return ; })}
{render()}
); });