Skip to content

Commit d7e2594

Browse files
committed
chore: mark broken code in Vue 3 for further fixes
1 parent e94e588 commit d7e2594

File tree

5 files changed

+21
-12
lines changed

5 files changed

+21
-12
lines changed

src/App.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<input type="checkbox" v-model="circles[3].loading" />
3939
</div>-->
4040
<div style="border: 1px solid red; display: inline-block">
41-
<vue-ellipse-progress
41+
<!--<vue-ellipse-progress
4242
:size="200"
4343
:progress="progress"
4444
:legendValue="1315.56"
@@ -59,7 +59,7 @@
5959
{{ formattedPrice(counterTick.currentValue) }}
6060
</span>
6161
</template>
62-
</vue-ellipse-progress>
62+
</vue-ellipse-progress>-->
6363
</div>
6464
<vue-ellipse-progress
6565
dot="20 green"

src/components/Circle/CircleContainer.vue

+8-6
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<svg class="ep-svg" :height="size" :width="size" xmlns="http://www.w3.org/2000/svg">
44
<g class="ep-circle--container">
55
<defs>
6-
<gradient v-if="isColorGradient" :color="color" type="progress" :id="_uid" />
7-
<gradient v-if="isColorFillGradient" :color="colorFill" type="progress-fill" :id="_uid" />
8-
<gradient v-if="isEmptyColorGradient" :color="emptyColor" type="empty" :id="_uid" />
9-
<gradient v-if="isEmptyColorFillGradient" :color="emptyColorFill" type="empty-fill" :id="_uid" />
6+
<gradient v-if="isColorGradient" :color="color" type="progress" :id="id" />
7+
<gradient v-if="isColorFillGradient" :color="colorFill" type="progress-fill" :id="id" />
8+
<gradient v-if="isEmptyColorGradient" :color="emptyColor" type="empty" :id="id" />
9+
<gradient v-if="isEmptyColorFillGradient" :color="emptyColorFill" type="empty-fill" :id="id" />
1010
</defs>
11-
<component :is="circleType" v-bind="$props" :id="_uid" />
11+
<component :is="circleType" v-bind="$props" :id="id" />
1212
</g>
1313
</svg>
14-
<circle-dot v-if="dot" v-bind="$props" :id="_uid" />
14+
<circle-dot v-if="dot" v-bind="$props" :id="id" />
1515
</div>
1616
</template>
1717

@@ -48,6 +48,8 @@ export default {
4848
type: [Number, String, Object],
4949
required: false,
5050
},
51+
// Temp Fix
52+
id: Number,
5153
},
5254
computed: {
5355
circleType() {

src/components/Circle/CircleDot.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ export default {
6262
borderRadius: `${this.dotSize / 2}px`,
6363
width: `${this.dotSize}px`,
6464
backgroundColor: this.dotColor,
65-
...this.dot,
65+
// eslint-disable-next-line max-len
66+
// FIXME: this is passed as String (e.g "20 green") and destructed ({0:2, 0:0...}), causing CSSStyleDeclaration Error
67+
// ...this.dot,
6668
transitionDuration: this.loading || !this.dataIsAvailable ? "0s" : this.animationDuration,
6769
height: `${this.dotSize}px`,
6870
};

src/components/Counter.vue

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

src/components/VueEllipseProgress.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<circle-container
1111
v-for="(options, i) in circlesData"
1212
:key="i"
13+
:id="i"
1314
v-bind="options"
1415
:multiple="isMultiple"
1516
:index="i"
@@ -25,14 +26,15 @@
2526
:style="{ fontSize, color: fontColor }"
2627
>
2728
<counter :value="legendVal" :animation="animation" :loading="loading">
28-
<template v-slot:default="{ counterTick }">
29+
<!--FIXME: This is completely broken in Vue 3-->
30+
<!--<template v-slot:default="{ counterTick }">
2931
<slot v-if="$scopedSlots.default" :counterTick="counterTick"></slot>
3032
<span v-if="legendFormatter">
3133
<span v-if="isHTML" v-html="legendFormatter(counterTick)"></span>
3234
<span v-else>{{ legendFormatter(counterTick) }}</span>
3335
</span>
3436
<span v-else-if="!$scopedSlots.default">{{ counterTick.currentFormattedValue }}</span>
35-
</template>
37+
</template>-->
3638
</counter>
3739
<slot name="legend-value"></slot>
3840
</div>
@@ -91,6 +93,9 @@ export default {
9193
return [this.$props];
9294
},
9395
},
96+
beforeCreate() {
97+
console.log(this)
98+
}
9499
};
95100
</script>
96101

0 commit comments

Comments
 (0)