+ {fields.map((field, index) => {
+ const sourceItem = value[index] ?? sampleItem
+
+ if (isPlainObject(sourceItem)) {
+ return (
+
}
+ onClick={() => remove(field.name)}
+ >
+ 删除
+
+ }
+ >
+
+ {Object.entries(sourceItem).map(([childKey, childValue]) =>
+ renderField([...namePath, field.name, childKey], childKey, childValue),
+ )}
+
+
+ )
+ }
+
+ return (
+
}
+ onClick={() => remove(field.name)}
+ >
+ 删除
+
+ }
+ >
+ {renderPrimitiveField(
+ [...namePath, field.name],
+ key,
+ sourceItem,
+ `${formatLabel(key)} ${index + 1}`,
+ )}
+
+ )
+ })}
+
+ ) : (
+