🐛 修复表单扩展字段 BUG

pull/36/head^2
smallbun 1 year ago
parent ea883b9cb3
commit 18fc2e090a

@ -35,6 +35,7 @@ import ConfigAbout from './ConfigAbout';
import { useIntl } from '@umijs/max'; import { useIntl } from '@umijs/max';
import { AuthorizationType } from '../CommonConfig'; import { AuthorizationType } from '../CommonConfig';
import { GetApp } from '../../../data.d'; import { GetApp } from '../../../data.d';
import { generateUUID } from '@/utils/utils';
const formItemLayout = { const formItemLayout = {
labelCol: { labelCol: {
span: 6, span: 6,
@ -64,7 +65,7 @@ export default (props: { app: GetApp | Record<string, any> }) => {
//其他字段 //其他字段
if (result?.otherField) { if (result?.otherField) {
const otherField = result?.otherField.map((i: Record<string, string>) => { const otherField = result?.otherField.map((i: Record<string, string>) => {
return { key: Date.now(), fieldValue: i.fieldValue, fieldName: i.fieldName }; return { key: generateUUID(), fieldValue: i.fieldValue, fieldName: i.fieldName };
}); });
form.setFieldsValue({ otherField: otherField }); form.setFieldsValue({ otherField: otherField });
setOtherFieldEditableKeys( setOtherFieldEditableKeys(

Loading…
Cancel
Save