This commit is contained in:
tugcekucukoglu 2024-01-12 12:51:29 +03:00
parent af69d1ff1d
commit 16b430df6a
3 changed files with 31 additions and 4 deletions

View file

@ -3,7 +3,10 @@
<slot v-if="labelPosition === 'start'" name="label" :value="value" :totalPercent="totalPercentValue()">
<ol :class="cx('labellist')" v-bind="ptm('labellist')">
<li v-for="(val, index) in value" :key="index + '_label'" :class="cx('labellistitem')" v-bind="ptm('labellistitem')">
<span :class="cx('labellisttype')" :style="{ backgroundColor: val.color }" v-bind="ptm('labellisttype')" />
<slot name="icon" :value="val" :class="cx('labelicon')">
<i v-if="val.icon" :class="[val.icon, cx('labelicon')]" v-bind="ptm('labelicon')" />
<span v-else :class="cx('labellisttype')" :style="{ backgroundColor: val.color }" v-bind="ptm('labellisttype')" />
</slot>
<span :class="cx('label')" v-bind="ptm('label')">{{ val.label }} ({{ percentValue(val.value) }})</span>
</li>
</ol>