Skip to content

Commit 1a143e8

Browse files
committed
[多选按钮 第二轮UI验收问题] 标题和checkbox没有对齐问题
1 parent 6a4ca04 commit 1a143e8

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

src/components/complex-checkbox/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export default function ComplexCheckbox(props) {
3131
[`${classSelector}-overflow-ellipsis`]: textOverflowEllipsis,
3232
[`${classSelector}-card`]: type === 'card',
3333
[`${classSelector}-card-disabled`]: type === 'card' && props.disabled,
34+
[`${classSelector}-has-content`]: !!content,
3435
})}
3536
{...otherProps}
3637
>
@@ -55,7 +56,7 @@ export default function ComplexCheckbox(props) {
5556
}
5657

5758
ComplexCheckbox.propTypes = {
58-
content: PropTypes.oneOfType([ PropTypes.string, PropTypes.element ]),
59+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
5960
imgSrc: PropTypes.string,
6061
title: PropTypes.string,
6162
textOverflowEllipsis: PropTypes.bool,

src/components/complex-checkbox/index.less

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,25 @@
1212
width: 24px;
1313
margin-right: 8px;
1414
border-radius: 3px;
15+
.@{prefix}-checkbox-wrapper {
16+
top: 0px;
17+
}
18+
}
19+
20+
&-has-content {
21+
.@{prefix}-checkbox-wrapper {
22+
top: 3px;
23+
}
1524
}
1625

1726
&-title {
1827
color: @gray-9;
19-
margin-bottom: 4px;
2028
}
2129

2230
&-content {
2331
color: @gray-7;
2432
line-height: 20px;
33+
margin-top: 4px;
2534
}
2635

2736
&-card {

0 commit comments

Comments
 (0)