mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
fix(demo): fixed form control demo.
This commit is contained in:
parent
17c897a61a
commit
17b8dfe6be
@ -45,7 +45,7 @@ ReactDOM.render(
|
|||||||
<Option value="jack">jack</Option>
|
<Option value="jack">jack</Option>
|
||||||
<Option value="lucy">lucy</Option>
|
<Option value="lucy">lucy</Option>
|
||||||
<Option value="disabled" disabled>disabled</Option>
|
<Option value="disabled" disabled>disabled</Option>
|
||||||
< Option value="yiminghe">yiminghe</Option>
|
<Option value="yiminghe">yiminghe</Option>
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ ReactDOM.render(
|
|||||||
label="Radio 单选框:"
|
label="Radio 单选框:"
|
||||||
labelCol={{ span: 6 }}
|
labelCol={{ span: 6 }}
|
||||||
wrapperCol={{ span: 18 }} >
|
wrapperCol={{ span: 18 }} >
|
||||||
<RadioGroup value="b">
|
<RadioGroup defaultValue="b">
|
||||||
<Radio value="a">A</Radio>
|
<Radio value="a">A</Radio>
|
||||||
<Radio value="b">B</Radio>
|
<Radio value="b">B</Radio>
|
||||||
<Radio value="c">C</Radio>
|
<Radio value="c">C</Radio>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
我们为 `form` 提供了以下两种排列方式:
|
我们为 `form` 提供了以下两种排列方式:
|
||||||
|
|
||||||
- 水平排列:可以实现 `label` 标签和表单控件的水平排列;
|
- 水平排列:可以实现 `label` 标签和表单控件的水平排列;
|
||||||
- 行内排列:使其表现为 `inline-block` 级别的控件。
|
- 行内排列:使其表现为 `inline-block` 级别的控件。
|
||||||
|
|
||||||
## 表单域
|
## 表单域
|
||||||
@ -85,7 +85,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
|||||||
|
|
||||||
#### this.props.form.getFieldProps(id, options)
|
#### this.props.form.getFieldProps(id, options)
|
||||||
|
|
||||||
`getFieldProps` 返回的属性包括 `id`、`value`(或你设置的其它 `valuePropName`)、`ref`、`onChange`(或者你设置的其它 `trigger` `validateTrigger`),所以不应再设置同样的属性,以免冲突。如果对其返回值的细节有兴趣,可以 `console.log` 出来查看。
|
`getFieldProps` 返回的属性包括 `id`、`value`(或你设置的其它 `valuePropName`)、`ref`、`onChange`(或者你设置的其它 `trigger` `validateTrigger`),所以不应再设置同样的属性,以免冲突。如果对其返回值的细节有兴趣,可以 `console.log` 出来查看。
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
||||||
|-----------|------------------------------------------|------------|-------|--------|
|
|-----------|------------------------------------------|------------|-------|--------|
|
||||||
@ -99,7 +99,7 @@ CustomizedForm = Form.create({})(CustomizedForm);
|
|||||||
|
|
||||||
### Form.Item
|
### Form.Item
|
||||||
|
|
||||||
> 一个 From.Item 建议只放一个 child,有多个 child 时,`help` `required` `validateStatus` 无法自动生成。
|
> 一个 Form.Item 建议只放一个 child,有多个 child 时,`help` `required` `validateStatus` 无法自动生成。
|
||||||
|
|
||||||
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
||||||
|-----------|------------------------------------------|------------|-------|--------|
|
|-----------|------------------------------------------|------------|-------|--------|
|
||||||
|
Loading…
Reference in New Issue
Block a user