Commit 49c890ebeccf0ffc4363333bb669e26f22d8d1da

Authored by liweijie0812
Committed by GitHub
1 parent c8dd3b6c

fix: Form appendSchemaByField移除hasInList判断 (#1341)

src/components/Form/src/hooks/useFormEvents.ts
@@ -125,9 +125,6 @@ export function useFormEvents({ @@ -125,9 +125,6 @@ export function useFormEvents({
125 const schemaList: FormSchema[] = cloneDeep(unref(getSchema)); 125 const schemaList: FormSchema[] = cloneDeep(unref(getSchema));
126 126
127 const index = schemaList.findIndex((schema) => schema.field === prefixField); 127 const index = schemaList.findIndex((schema) => schema.field === prefixField);
128 - const hasInList = schemaList.some((item) => item.field === prefixField || schema.field);  
129 -  
130 - if (!hasInList) return;  
131 128
132 if (!prefixField || index === -1 || first) { 129 if (!prefixField || index === -1 || first) {
133 first ? schemaList.unshift(schema) : schemaList.push(schema); 130 first ? schemaList.unshift(schema) : schemaList.push(schema);