refactor(plugin-workflow): add card layout for assigning fields (#4642)

This commit is contained in:
Junyi 2024-06-12 23:46:05 +08:00 committed by GitHub
parent ecb56130cf
commit a6c16cf3db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,6 +32,7 @@ import {
import { useFlowContext } from '../FlowContext';
import { useWorkflowVariableOptions } from '../variable';
import { Card } from 'antd';
function reduceSchema(s, fn) {
fn(s);
@ -117,20 +118,22 @@ export function AssignedFieldsFormSchemaConfig(props) {
);
return (
<CollectionManagerProvider dataSource={dataSourceName}>
<CollectionProvider name={collectionName}>
<FormProvider form={form}>
<FormLayout layout={'vertical'}>
<VariableScopeProvider scope={scope}>
<SchemaComponentProvider form={form} designable>
<SchemaComponentOptions {...schemaOptions}>
<SchemaComponent schema={schema} onChange={onChange} />
</SchemaComponentOptions>
</SchemaComponentProvider>
</VariableScopeProvider>
</FormLayout>
</FormProvider>
</CollectionProvider>
</CollectionManagerProvider>
<Card>
<CollectionManagerProvider dataSource={dataSourceName}>
<CollectionProvider name={collectionName}>
<FormProvider form={form}>
<FormLayout layout={'vertical'}>
<VariableScopeProvider scope={scope}>
<SchemaComponentProvider form={form} designable>
<SchemaComponentOptions {...schemaOptions}>
<SchemaComponent schema={schema} onChange={onChange} />
</SchemaComponentOptions>
</SchemaComponentProvider>
</VariableScopeProvider>
</FormLayout>
</FormProvider>
</CollectionProvider>
</CollectionManagerProvider>
</Card>
);
}