Browse Source

Merge pull request #473 from ant-design/fix-form-warning

fix: fix form demo warning. fixed #470.
pull/526/head
偏右 9 years ago
parent
commit
79682dd61c
  1. 4
      components/form/demo/inline-form.md
  2. 2
      components/form/demo/input-group.md
  3. 12
      components/form/demo/validate.md

4
components/form/demo/inline-form.md

@ -40,12 +40,12 @@ const Demo = React.createClass({
<FormItem
id="userName"
label="账户:">
<Input placeholder="请输入账户名" id="userName" name="userName" onChange={this.setValue.bind(this, 'userName')} />
<Input placeholder="请输入账户名" id="userName" name="userName" onChange={this.setValue.bind(this, 'userName')} value={formData.userName} />
</FormItem>
<FormItem
id="password"
label="密码:">
<Input type="password" placeholder="请输入密码" id="password" name="password" onChange={this.setValue.bind(this, 'password')} />
<Input type="password" placeholder="请输入密码" id="password" name="password" onChange={this.setValue.bind(this, 'password')} value={formData.password} />
</FormItem>
<FormItem>
<label className="ant-checkbox-inline">

2
components/form/demo/input-group.md

@ -69,7 +69,7 @@ ReactDOM.render(
wrapperCol={{span: 16}}>
<Row>
<Col span="4">
<Input id="tel1" value="086" />
<Input id="tel1" defaultValue="086" />
</Col>
<Col span="2">
<p className="ant-form-split">--</p>

12
components/form/demo/validate.md

@ -24,7 +24,7 @@ ReactDOM.render(
wrapperCol={{span: 12}}
validateStatus="error"
help="请输入数字和字母组合">
<Input value="无效选择" id="error" />
<Input defaultValue="无效选择" id="error" />
</FormItem>
<FormItem
@ -32,7 +32,7 @@ ReactDOM.render(
labelCol={{span: 5}}
wrapperCol={{span: 12}}
validateStatus="warning">
<Input value="前方高能预警" id="warning" />
<Input defaultValue="前方高能预警" id="warning" />
</FormItem>
<FormItem
@ -42,7 +42,7 @@ ReactDOM.render(
hasFeedback={true}
validateStatus="validating"
help="信息审核中...">
<Input value="我是被校验的内容" id="validating" />
<Input defaultValue="我是被校验的内容" id="validating" />
</FormItem>
<FormItem
@ -51,7 +51,7 @@ ReactDOM.render(
wrapperCol={{span: 12}}
hasFeedback={true}
validateStatus="success">
<Input value="我是正文" id="success" />
<Input defaultValue="我是正文" id="success" />
</FormItem>
<FormItem
@ -60,7 +60,7 @@ ReactDOM.render(
wrapperCol={{span: 12}}
hasFeedback={true}
validateStatus="warning">
<Input value="前方高能预警" id="warning" />
<Input defaultValue="前方高能预警" id="warning" />
</FormItem>
<FormItem
@ -70,7 +70,7 @@ ReactDOM.render(
hasFeedback={true}
validateStatus="error"
help="请输入数字和字母组合">
<Input value="无效选择" id="error" />
<Input defaultValue="无效选择" id="error" />
</FormItem>
<FormItem

Loading…
Cancel
Save