File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 border : 1px solid #e8e8e8 ;
3232 min-width : 120px ;
3333 & :hover {
34- background : @gray-2 ;
34+ // background: @gray-2;
3535 border : 1px solid #496bf5 ;
3636 }
3737 &-checked {
Original file line number Diff line number Diff line change 3535 border : 1px solid #e8e8e8 ;
3636
3737 & :hover {
38- background : @gray-2 ;
38+ // background: @gray-2;
39+ border : 1px solid #496bf5 ;
3940 }
4041
4142 &-checked {
5253 border : 1px solid #e8e8e8 ;
5354
5455 & :hover {
56+ border : 1px solid #e8e8e8 ;
5557 background : #f5f5f5 ;
5658 }
5759 }
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export default function FormHorizontalDemo() {
4343 };
4444
4545 return (
46- < Form key= {` ${ size} -${ labelAlign} -${ layout} ` } field= {field} size= {size === ' default' ? undefined : size}
46+ < Form fixedError key= {` ${ size} -${ labelAlign} -${ layout} ` } field= {field} size= {size === ' default' ? undefined : size}
4747 labelAlign= {labelAlign}
4848 layout= {layout}
4949 labelCol= {{ span: 6 }} style= {{ width: 494 , margin: ' 0 auto' }}>
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export default class Form extends Component {
7171 gap,
7272 ...others
7373 } = this . props ;
74- const props = omit ( others , [ 'scrollToFirstError' ] ) ;
74+ const props = omit ( others , [ 'scrollToFirstError' ] ) ;
7575 const classNames = classnames ( `${ prefixCls } -form` , className ) ;
7676
7777 return (
@@ -114,7 +114,7 @@ Form.propTypes = {
114114 FORM_SIZE_TYPES . DEFAULT ,
115115 FORM_SIZE_TYPES . LARGE ,
116116 ] ) ,
117- labelAlign : PropTypes . oneOf ( [ LABEL_ALIGN . LEFT , LABEL_ALIGN . RIGHT ] ) ,
117+ labelAlign : PropTypes . oneOf ( [ LABEL_ALIGN . LEFT , LABEL_ALIGN . RIGHT ] ) ,
118118 labelCol : PropTypes . shape ( {
119119 span : PropTypes . number ,
120120 offset : PropTypes . number ,
@@ -141,6 +141,6 @@ Form.defaultProps = {
141141 wrapperCol : { } ,
142142 children : null ,
143143 scrollToFirstError : false ,
144- fixedError : true ,
144+ fixedError : false ,
145145 gap : 20 ,
146146} ;
Original file line number Diff line number Diff line change 3030| labelWrap | 配合` label ` 属性使用,表示` label ` 是否在超宽时换行 | boolean | ` false ` |
3131| className | Form 的 className 属性 | string | - |
3232| scrollToFirstError | 提交失败自动滚动到第一个错误字段,` field ` 字段不存在时无效 | boolean | ` false ` |
33- | fixedError | 展示报错提示时表单项位置是否发生变化 | boolean | ` true ` |
33+ | fixedError | 展示报错提示时表单项位置是否发生变化 | boolean | ` false ` |
3434| gap | 各个表单项的间距 | number | 20 |
3535
3636如果 Form 和 Form.Item 相同的属性,Form.Item 的优先级更高,如果 Form 上设置了就不用每一个 Form.Item 上都进行设置,更加方便
You can’t perform that action at this time.
0 commit comments