Use correct names
parent
4a38339368
commit
e806f87559
|
@ -7,7 +7,7 @@
|
||||||
<div :class="cx('metercontainer')" v-bind="ptm('metercontainer')">
|
<div :class="cx('metercontainer')" v-bind="ptm('metercontainer')">
|
||||||
<template v-for="(val, index) in value" :key="index">
|
<template v-for="(val, index) in value" :key="index">
|
||||||
<slot name="meter" :value="val" :index="index" :class="cx('meter')" :orientation="orientation" :size="percentValue(val.value)" :totalPercent="totalPercent">
|
<slot name="meter" :value="val" :index="index" :class="cx('meter')" :orientation="orientation" :size="percentValue(val.value)" :totalPercent="totalPercent">
|
||||||
<span v-if="percent(val.value)" :class="cx('meter')" :style="meterSize(val)" v-bind="getPTOptions('meter', val, index)" />
|
<span v-if="percent(val.value)" :class="cx('meter')" :style="meterCalculatedStyles(val)" v-bind="getPTOptions('meter', val, index)" />
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +43,7 @@ export default {
|
||||||
percentValue(meter) {
|
percentValue(meter) {
|
||||||
return this.percent(meter) + '%';
|
return this.percent(meter) + '%';
|
||||||
},
|
},
|
||||||
meterSize(val) {
|
meterCalculatedStyles(val) {
|
||||||
return {
|
return {
|
||||||
backgroundColor: val.color,
|
backgroundColor: val.color,
|
||||||
width: this.orientation === 'horizontal' && this.percentValue(val.value),
|
width: this.orientation === 'horizontal' && this.percentValue(val.value),
|
||||||
|
|
Loading…
Reference in New Issue