--- order: 1 title: zh-CN: 平行排列 en-US: Inline form --- ## zh-CN 行内排列,常用于登录界面。 ## en-US Inline form is often used for login. ````jsx import { Form, Input, Button, Checkbox } from 'antd'; const FormItem = Form.Item; let Demo = React.createClass({ handleSubmit(e) { e.preventDefault(); console.log('Received values of form:', this.props.form.getFieldsValue()); }, render() { const { getFieldDecorator } = this.props.form; return (
{getFieldDecorator('userName')( )} {getFieldDecorator('password')( )} {getFieldDecorator('agreement')( Remember me )}
); }, }); Demo = Form.create()(Demo); ReactDOM.render(, mountNode); ````