chore: associate field

This commit is contained in:
katherinehhh 2023-04-28 13:35:45 +08:00
parent 2d64123b2a
commit 824629b7fe

View File

@ -1,5 +1,6 @@
import { ISchema } from '@formily/react'; import { ISchema } from '@formily/react';
import { cloneDeep } from 'lodash'; import { cloneDeep } from 'lodash';
import { uid } from '@formily/shared';
import { import {
constraintsProps, constraintsProps,
recordPickerSelector, recordPickerSelector,
@ -111,7 +112,7 @@ export const o2m: IField = {
type: 'object', type: 'object',
properties: { properties: {
block: { block: {
type: 'void', type: 'object',
'x-decorator': 'SubFormProvider', 'x-decorator': 'SubFormProvider',
'x-decorator-props': { 'x-decorator-props': {
collection: field.target, collection: field.target,
@ -126,7 +127,7 @@ export const o2m: IField = {
bordered: true, bordered: true,
}, },
properties: { properties: {
[field.name]: { [uid()]: {
type: 'object', type: 'object',
'x-component': 'FormV2', 'x-component': 'FormV2',
'x-component-props': { 'x-component-props': {