Skip to content

Commit 63b65b7

Browse files
committed
VueUiWheel improved animation
1 parent 5a0603d commit 63b65b7

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-data-ui",
33
"private": false,
4-
"version": "1.9.28",
4+
"version": "1.9.29",
55
"type": "module",
66
"description": "A user-empowering data visualization Vue components library",
77
"keywords": [

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3513,7 +3513,7 @@ const updateStep = ref(0);
35133513
<h4 style="color: #5f8bee">Manual testing arena</h4>
35143514
</div>
35153515

3516-
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_wheel)">
3516+
<Box @copy="copyConfig(PROD_CONFIG.vue_ui_wheel)" open>
35173517
<template #title>VueUiWheel</template>
35183518
<template #dev>
35193519
<WheelTest

src/Box.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
import { ref } from "vue";
33
const showConfig = ref(false);
44
5+
const props = defineProps({
6+
open: {
7+
type: Boolean,
8+
default: false
9+
}
10+
})
11+
512
const emit = defineEmits(['copy'])
613
714
const isCopying = ref(false);
@@ -18,7 +25,7 @@ function copy() {
1825

1926
<template>
2027
<div style="width: 100%;margin-top:12px; background: #2A2A2A;">
21-
<details>
28+
<details :open="open">
2229
<summary style="user-select:none;cursor:pointer;height:30px;background:linear-gradient(to right, #2A2A2A, #1A1A1A);line-height:24px;font-size:24px;padding:12px;">
2330
<span style="color:#42d392">
2431
<slot name="title"></slot>

src/components/vue-ui-wheel.vue

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ defineExpose({
195195
:stroke="tick.color"
196196
:stroke-width="5"
197197
:stroke-linecap="wheelConfig.style.chart.layout.wheel.ticks.rounded ? 'round' : 'butt'"
198+
:class="{ 'vue-ui-tick-animated': wheelConfig.style.chart.animation.use && i <= activeValue }"
198199
/>
199200
<circle
200201
v-if="wheelConfig.style.chart.layout.innerCircle.show"
@@ -230,4 +231,20 @@ defineExpose({
230231
user-select: none;
231232
position: relative;
232233
}
234+
.vue-ui-tick-animated {
235+
animation: animate-tick 0.3s ease-in;
236+
transform-origin: center;
237+
}
238+
239+
@keyframes animate-tick {
240+
0% {
241+
stroke-width: 8;
242+
}
243+
80% {
244+
stroke-width: 6;
245+
}
246+
100% {
247+
stroke-width: 5;
248+
}
249+
}
233250
</style>

0 commit comments

Comments
 (0)