antd-v4-compatible-form
Version:
antd@4.x form,用于 antd@3.x
30 lines (23 loc) • 624 B
Markdown
4.x` Form, Used for `antd@3.x`
```js
import Form from 'antd-v4-compatible-form';
const ExampleForm = () => {
function handleFinish(data) {
console.log(data);
}
return (
<Form onFinish={handleFinish}>
<Form.Item name="username" rules={[{ required: true }]}>
<Input placeholder="Please enter username." maxLength={128} />
</Form.Item>
<Button type="primary" htmlType="submit" block>
Submit
</Button>
</Form>
);
};
```
[ ](https://next.ant.design/components/form-cn/)
`antd@