提交 2dd781ed 编写于 作者: B Benjy Cui

docs: update demo

上级 a058ebc3
......@@ -7,7 +7,7 @@
---
````jsx
import { Form, Input, Button, Checkbox, Radio, Row, Col } from 'antd';
import { Form, Input, Button, Checkbox, Radio, Row, Col, Tooltip, Icon } from 'antd';
const FormItem = Form.Item;
const RadioGroup = Radio.Group;
......@@ -19,38 +19,39 @@ let Demo = React.createClass({
render() {
const { getFieldProps } = this.props.form;
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 14 },
};
return (
<Form horizontal onSubmit={this.handleSubmit}>
<FormItem
label="用户名:"
labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}>
{...formItemLayout}
label="用户名:">
<p className="ant-form-text" id="userName" name="userName">大眼萌 minion</p>
</FormItem>
<FormItem
label="密码:"
labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}>
{...formItemLayout}
label="密码:">
<Input type="password" {...getFieldProps('pass')} placeholder="请输入密码" />
</FormItem>
<FormItem
label="您的性别:"
labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}>
{...formItemLayout}
label="您的性别:">
<RadioGroup {...getFieldProps('gender', { initialValue: 'female' })}>
<Radio value="male">男的</Radio>
<Radio value="female">女的</Radio>
</RadioGroup>
</FormItem>
<FormItem
{...formItemLayout}
label="备注:"
labelCol={{ span: 6 }}
wrapperCol={{ span: 14 }}
help="随便写点什么">
<Input type="textarea" placeholder="随便写" {...getFieldProps('remark')} />
</FormItem>
<FormItem
wrapperCol={{ span: 14, offset: 6 }}>
{...formItemLayout}
label={<span>卖身华府<Tooltip title="我为秋香"><Icon type="question" /></Tooltip></span>}>
<label>
<Checkbox {...getFieldProps('agreement')} />同意
</label>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册