fields内数组元素结构为Form.List内部定义, {key: 0, name: 0, isListField: true, fieldKey: 0}
Form.List 在提交Form时生成一个数组包含动态录入的多行数据
- 数组的名字为Form.List的 name属性值,name=”contacts”
- 在 onFinish事件函数中可以获取到该数组 ```jsx import React from “react”; import { Input, Form, Col, Row, Button, Space } from “antd”; import { MinusCircleOutlined, PlusOutlined } from “@ant-design/icons”;
const initValues = [ {usrename: ‘’, phone: ‘’} ]
function App() { const form = Form.useForm(); const [state, setState] = React.useState(initValues)
return (