函数式组件
import { Modal, Form, Input, Button, Space } from 'antd';
const [form] = Form.useForm();
form.resetFields();
<Form {...layout} form={form} name="control-ref" onFinish={onFinish}></Form>
class类组件
import { FormInstance } from 'antd/lib/form';
formRef = React.createRef<FormInstance>();
this.formRef.current.submit()
<Form {...layout} ref={this.formRef} onFinish={this.onFinish} >
</Form>
实体类具备的方法和属性