Skip to content

Commit 116a3f4

Browse files
committed
💄 修改复杂单选组件和复杂多选组件的样式
1 parent fb5dbdc commit 116a3f4

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/components/complex-checkbox/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
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 {

src/components/complex-radio/index.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
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 {
@@ -52,6 +53,7 @@
5253
border: 1px solid #e8e8e8;
5354

5455
&:hover {
56+
border: 1px solid #e8e8e8;
5557
background: #f5f5f5;
5658
}
5759
}

src/components/form/demos/basic-forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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' }}>

src/components/form/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
};

src/components/form/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ group:
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 上都进行设置,更加方便

0 commit comments

Comments
 (0)