mirror of
https://github.com/ant-design/ant-design.git
synced 2025-07-31 03:46:28 +08:00
更新 form 文档。
This commit is contained in:
parent
0d2a6f9c3c
commit
3a38ad40d3
@ -132,7 +132,7 @@ FormItem.propTypes = {
|
|||||||
label: React.PropTypes.node,
|
label: React.PropTypes.node,
|
||||||
labelCol: React.PropTypes.object,
|
labelCol: React.PropTypes.object,
|
||||||
help: React.PropTypes.node,
|
help: React.PropTypes.node,
|
||||||
validateStatus: React.PropTypes.oneOf(['success', 'warning', 'error', 'validating']),
|
validateStatus: React.PropTypes.oneOf(['', 'success', 'warning', 'error', 'validating']),
|
||||||
hasFeedback: React.PropTypes.bool,
|
hasFeedback: React.PropTypes.bool,
|
||||||
wrapperCol: React.PropTypes.object,
|
wrapperCol: React.PropTypes.object,
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
- order: 0
|
- order: 0
|
||||||
|
|
||||||
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),具体使用详见 [API]()。
|
我们为 `<Input />` 输入框定义了三种尺寸(大、默认、小),具体使用详见 [API](./components/form/#input)。
|
||||||
|
|
||||||
注意: 在表单里面,我们只使用**大尺寸**, 即高度为 **32px**,作为唯一的尺寸。
|
注意: 在表单里面,我们只使用**大尺寸**, 即高度为 **32px**,作为唯一的尺寸。
|
||||||
|
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
| label | label 标签的文本 | string | | |
|
| label | label 标签的文本 | string | | |
|
||||||
| labelCol | label 标签布局,通 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` | object | | |
|
| labelCol | label 标签布局,通 `<Col>` 组件,设置 `span` `offset` 值,如 `{span: 3, offset: 12}` | object | | |
|
||||||
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | object | | |
|
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | object | | |
|
||||||
| help | 提示信息 | string | | '' |
|
| help | 提示信息 | string | | |
|
||||||
| required | 是否必填 | bool | | false |
|
| required | 是否必填 | bool | | false |
|
||||||
| hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false |
|
| hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false |
|
||||||
| validateStatus | 校验状态 | string | 'success' 'warning' 'error' 'validating' | '' |
|
| validateStatus | 校验状态 | string | 'success' 'warning' 'error' 'validating' | |
|
||||||
| prefixCls | 样式类名,默认为 ant-form,通常您不需要设置 | string | | 'ant-form' |
|
| prefixCls | 样式类名,默认为 ant-form,通常您不需要设置 | string | | 'ant-form' |
|
||||||
|
|
||||||
### Form.ValueMixin
|
### Form.ValueMixin
|
||||||
@ -69,10 +69,10 @@ Mixin:当表单控件的输入值改变时,更新 formData。
|
|||||||
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
| 参数 | 说明 | 类型 | 可选值 |默认值 |
|
||||||
|-----------|------------------------------------------|------------|-------|--------|
|
|-----------|------------------------------------------|------------|-------|--------|
|
||||||
| type | 【必须】声明 input 类型,同原生 input 标签的 type 属性 | string | | 'text' |
|
| type | 【必须】声明 input 类型,同原生 input 标签的 type 属性 | string | | 'text' |
|
||||||
| value | value 值 | any | | '' |
|
| value | value 值 | any | | |
|
||||||
| id | id | number 或 string | | |
|
| id | id | number 或 string | | |
|
||||||
| size | 控件大小,默认值为 default | string | {'large','default','small'} | 'default' |
|
| size | 控件大小,默认值为 default | string | {'large','default','small'} | 'default' |
|
||||||
| defaultValue | 设置初始默认值 | any | | '' |
|
| defaultValue | 设置初始默认值 | any | | |
|
||||||
| disabled | 是否禁用状态,默认为 false | bool | | false |
|
| disabled | 是否禁用状态,默认为 false | bool | | false |
|
||||||
| addonBefore | 带标签的 input,设置前置标签 | node | | |
|
| addonBefore | 带标签的 input,设置前置标签 | node | | |
|
||||||
| addonAfter | 带标签的 input,设置后置标签 | node | | |
|
| addonAfter | 带标签的 input,设置后置标签 | node | | |
|
||||||
|
Loading…
Reference in New Issue
Block a user