Skip to content

Commit 2e74bb5

Browse files
committed
fix: legendValue rendering
1 parent a0ee8e4 commit 2e74bb5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/components/Counter.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<span class="ep-legend--value__counter">
3-
<slot :counterTick="counterProps"> </slot>
3+
<slot :counterTick="counterProps"></slot>
44
<!--<span v-if="!$scopedSlots.default">{{ formattedValue }}</span>-->
55
</span>
66
</template>

src/components/VueEllipseProgress.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
:style="{ fontSize, color: fontColor }"
1717
>
1818
<counter :value="legendVal" :animation="normalizedCircles[0].animation" :loading="loading">
19-
<!--FIXME: This is completely broken in Vue 3-->
20-
<!--<template v-slot:default="{ counterTick }">
21-
<slot v-if="$scopedSlots.default" :counterTick="counterTick"></slot>
19+
<template v-slot:default="{ counterTick }">
2220
<span v-if="legendFormatter">
2321
<span v-if="isHTML" v-html="legendFormatter(counterTick)"></span>
2422
<span v-else>{{ legendFormatter(counterTick) }}</span>
2523
</span>
26-
<span v-else-if="!$scopedSlots.default">{{ counterTick.currentFormattedValue }}</span>
27-
</template>-->
24+
<slot v-else :counterTick="counterTick">
25+
<span>{{ counterTick.currentFormattedValue }}</span>
26+
</slot>
27+
</template>
2828
</counter>
2929
<slot name="legend-value"></slot>
3030
</div>

0 commit comments

Comments
 (0)