Skip to content

Commit f3024d6

Browse files
committed
fix: apply dot bounce animation duration correctly
1 parent 003939d commit f3024d6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
}"
5454
>
5555
</ve-progress>
56-
<ve-progress :progress="progress" dot="20" animation="loop 1000 2000" half> </ve-progress>
56+
<ve-progress :progress="progress" dot="20" animation="bounce 1000 2000"> </ve-progress>
5757
</div>
5858
<ve-progress half line-position="center" :progress="0" :line="parseInt(progress) === 0 ? 'butt' : 'round'">
5959
<template #default="{ counterTick }">

src/components/Circle/CircleDot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default {
5959
},
6060
bounce: {
6161
opacity: 0,
62-
"animation-duration": `${this.animationDuration + 500}ms`,
62+
"animation-duration": `${this.options.animation.duration + (this.options.animation.duration * 10) / 100}ms`,
6363
},
6464
};
6565
return styles[this.options.animation.type];

tests/unit/circle/circle-animation.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ describe("#animation", () => {
131131
parseRawOptions({ progress: 50, dot: 5, animation: "bounce 500 0" }),
132132
CircleContainer
133133
).findComponent(CircleDot).element.style.animationDuration
134-
).to.equal(`${expectedDuration}`);
134+
).to.equal(`${expectedDuration}ms`);
135135
});
136136
});
137137

0 commit comments

Comments
 (0)