mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
Merge pull request #473 from ant-design/fix-form-warning
fix: fix form demo warning. fixed #470.
This commit is contained in:
commit
79682dd61c
@ -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">
|
||||
|
@ -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>
|
||||
|
@ -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…
Reference in New Issue
Block a user