提交 5d6c8ed3 作者: test

fix: 修复 Legend 样式问题

上级 7f070ce9
...@@ -105,7 +105,12 @@ ...@@ -105,7 +105,12 @@
/> />
<!-- 标签 --> <!-- 标签 -->
<view v-if="item.label" class="label" :style="!sub && { ...data.option.labelStyle }"> <view
v-if="item.label"
class="label"
:class="{ 'color-label': item.color }"
:style="!sub && { ...data.option.labelStyle }"
>
{{ item.label }} {{ item.label }}
</view> </view>
...@@ -198,10 +203,9 @@ ...@@ -198,10 +203,9 @@
} }
.color { .color {
width: 32rpx; width: 38rpx;
height: 12rpx; height: 24rpx;
margin-right: 8rpx; margin-right: 8rpx;
padding: 4rpx;
} }
.label { .label {
...@@ -209,6 +213,10 @@ ...@@ -209,6 +213,10 @@
letter-spacing: 1px; letter-spacing: 1px;
white-space: pre-wrap; white-space: pre-wrap;
text-align: center; text-align: center;
&.color-label {
height: 24rpx;
}
} }
} }
...@@ -217,6 +225,7 @@ ...@@ -217,6 +225,7 @@
.item { .item {
flex-direction: column; flex-direction: column;
justify-content: center;
margin: 2rpx 5rpx; margin: 2rpx 5rpx;
font-size: 20rpx; font-size: 20rpx;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论