|
|
|
|
@ -14,7 +14,7 @@
|
|
|
|
|
<span class="bar-item-label mr-8"> |
|
|
|
|
{{ item.label }} |
|
|
|
|
</span> |
|
|
|
|
<div class="bar-item_content mr-8" :long="!item.denominator"> |
|
|
|
|
<div class="bar-item_content " :long="!item.denominator"> |
|
|
|
|
<div |
|
|
|
|
class="bar-item_content-bar" |
|
|
|
|
:style="{ |
|
|
|
|
@ -23,7 +23,7 @@
|
|
|
|
|
}" |
|
|
|
|
></div> |
|
|
|
|
</div> |
|
|
|
|
<span >{{ item.value }}</span> |
|
|
|
|
<span>{{ item.value }}</span> |
|
|
|
|
<span |
|
|
|
|
class="bar-item_remark text-right ml-8" |
|
|
|
|
v-if="item.denominator" |
|
|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script setup> |
|
|
|
|
import { onMounted } from "vue"; |
|
|
|
|
import {onMounted} from "vue"; |
|
|
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
|
title: { |
|
|
|
|
@ -113,12 +113,15 @@ function getColor(val) {
|
|
|
|
|
.bar-title { |
|
|
|
|
font-size: 19px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-sub-title { |
|
|
|
|
color: #597ae9; |
|
|
|
|
font-size: 14px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item { |
|
|
|
|
font-size: 17px; |
|
|
|
|
|
|
|
|
|
&[size="large"] { |
|
|
|
|
.bar-item_content { |
|
|
|
|
.bar-item_content-bar { |
|
|
|
|
@ -126,9 +129,15 @@ function getColor(val) {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&[size="small"] { |
|
|
|
|
font-size: 12px; |
|
|
|
|
.bar-item_content { |
|
|
|
|
width: calc(100% - 180px); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item-label { |
|
|
|
|
text-align: right; |
|
|
|
|
width: var(--label-width); |
|
|
|
|
@ -136,25 +145,32 @@ function getColor(val) {
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
text-overflow: ellipsis; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&[position="left"] { |
|
|
|
|
height: 32px; |
|
|
|
|
line-height: 32px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
&[position="top"] { |
|
|
|
|
margin-bottom: 4px; |
|
|
|
|
|
|
|
|
|
.bar-item-label { |
|
|
|
|
width: 100%; |
|
|
|
|
text-align: left; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item_content { |
|
|
|
|
width: calc(100% - 80px); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item_content { |
|
|
|
|
width: calc(100% - var(--label-width) - 16px - 30px); |
|
|
|
|
|
|
|
|
|
&[long=false] { |
|
|
|
|
width: calc(100% - var(--label-width) - 36px - 58px); |
|
|
|
|
width: calc(100% - var(--label-width) - 36px - 110px); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item_content-bar { |
|
|
|
|
width: 0; |
|
|
|
|
height: 9px; |
|
|
|
|
@ -162,8 +178,10 @@ function getColor(val) {
|
|
|
|
|
transition: width 0.3s; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bar-item_remark { |
|
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
|
|
.text-success { |
|
|
|
|
color: #09c700; |
|
|
|
|
} |
|
|
|
|
|