Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wanjj_1210
ant-design
提交
26d9c64f
A
ant-design
项目概览
wanjj_1210
/
ant-design
与 Fork 源项目一致
从无法访问的项目Fork
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
ant-design
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
26d9c64f
编写于
10月 30, 2015
作者:
S
SimaQ
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 修复通 Validator 结合使用输入失焦的问题。
上级
0097b574
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
10 deletion
+13
-10
components/form/FormItem.jsx
components/form/FormItem.jsx
+7
-7
components/form/demo/validate.md
components/form/demo/validate.md
+1
-1
components/form/index.md
components/form/index.md
+2
-2
style/components/form.less
style/components/form.less
+3
-0
未找到文件。
components/form/FormItem.jsx
浏览文件 @
26d9c64f
...
...
@@ -30,8 +30,9 @@ class FormItem extends React.Component {
}
renderValidateWrapper
(
children
)
{
let
classes
=
''
;
if
(
this
.
props
.
validateStatus
)
{
c
onst
c
lasses
=
cx
(
classes
=
cx
(
{
'
has-feedback
'
:
this
.
props
.
hasFeedback
,
'
has-success
'
:
this
.
props
.
validateStatus
===
'
success
'
,
...
...
@@ -40,13 +41,12 @@ class FormItem extends React.Component {
'
is-validating
'
:
this
.
props
.
validateStatus
===
'
validating
'
,
}
);
return
(
<
div
className
=
{
classes
}
>
{
children
}
</
div
>
);
}
return
children
;
return
(
<
div
className
=
{
classes
}
>
{
children
}
</
div
>
);
}
renderWrapper
(
children
)
{
...
...
components/form/demo/validate.md
浏览文件 @
26d9c64f
...
...
@@ -74,7 +74,7 @@ ReactDOM.render(
</
FormItem
>
<
FormItem
label
=
"Datepicker
失败
:"
label
=
"Datepicker:"
labelCol
=
{
{
span
:
5
}
}
validateStatus
=
"error"
>
<
Col
span
=
"6"
>
...
...
components/form/index.md
浏览文件 @
26d9c64f
...
...
@@ -20,7 +20,7 @@
表单一定会包含表单域,表单域可以是输入控件,标准表单域,标签,下拉菜单,文本域等。
这里我们分别
为表单域和输入控件封装了
这里我们分别
封装了表单域
`<Form.Item>`
和输入控件
`<Input>`
。
```
html
<Form.Item
{...
props
}
>
...
...
@@ -54,8 +54,8 @@
| wrapperCol | 需要为输入控件设置布局样式时,使用该属性,用法同 labelCol | object | | |
| help | 提示信息 | string | | |
| required | 是否必填 | bool | | false |
| hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false |
| validateStatus | 校验状态 | string | 'success' 'warning' 'error' 'validating' | |
| hasFeedback | 配合 validateStatus 属性使用,是否展示校验状态图标 | bool | | false |
| prefixCls | 样式类名,默认为 ant-form,通常您不需要设置 | string | | 'ant-form' |
### Form.ValueMixin
...
...
style/components/form.less
浏览文件 @
26d9c64f
...
...
@@ -216,6 +216,9 @@ form {
//== Inline Form
.@{css-prefix}form-inline {
div {
display: inline-block;
}
.@{css-prefix}form-item {
display: inline-block;
margin-right: 10px;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录