Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
Descriptions: fix label slot bug (ElemeFE#21462)
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 authored and CarterLi committed Nov 19, 2021
1 parent a8e3a2d commit bd45cd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/descriptions/src/descriptions-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default {
[item.labelClassName]: true
}}
style={item.labelStyle}
>{item.props.label}</span>
>{item.label}</span>
<span
class={['el-descriptions-item__content', item.contentClassName]}
style={item.contentStyle}
Expand Down
14 changes: 12 additions & 2 deletions packages/theme-chalk/src/descriptions-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@
@import 'common/var';

@include b(descriptions-item) {
vertical-align: top;

@include e(container) {
display: flex;

.el-descriptions-item__label,
.el-descriptions-item__content {
display: inline-flex;
align-items: baseline;
}
.el-descriptions-item__content {
flex: 1;
}
}

@include e(label) {
Expand All @@ -20,13 +30,13 @@
color: $--color-text-secondary;
background: $--descriptions-item-bordered-label-background;
}

&:not(.is-bordered-label) {
margin-right: 10px;
}
}

@include e(content) {

word-break: break-word;
overflow-wrap: break-word;
}
}

0 comments on commit bd45cd4

Please sign in to comment.