Commit bb35f474 authored by 好多大米's avatar 好多大米 Committed by GitHub

Descriptions: fix label slot bug (#21462)

parent fa76e11c
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
[item.labelClassName]: true [item.labelClassName]: true
}} }}
style={item.labelStyle} style={item.labelStyle}
>{item.props.label}</span> >{item.label}</span>
<span <span
class={['el-descriptions-item__content', item.contentClassName]} class={['el-descriptions-item__content', item.contentClassName]}
style={item.contentStyle} style={item.contentStyle}
......
...@@ -2,9 +2,19 @@ ...@@ -2,9 +2,19 @@
@import 'common/var'; @import 'common/var';
@include b(descriptions-item) { @include b(descriptions-item) {
vertical-align: top;
@include e(container) { @include e(container) {
display: flex; 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) { @include e(label) {
...@@ -20,13 +30,13 @@ ...@@ -20,13 +30,13 @@
color: $--color-text-secondary; color: $--color-text-secondary;
background: $--descriptions-item-bordered-label-background; background: $--descriptions-item-bordered-label-background;
} }
&:not(.is-bordered-label) { &:not(.is-bordered-label) {
margin-right: 10px; margin-right: 10px;
} }
} }
@include e(content) { @include e(content) {
word-break: break-word;
overflow-wrap: break-word;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment