🎨
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<span>{{ number(tweened.number.toFixed(0)) }}</span>
|
<span>{{ number(Math.floor(tweened.number)) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -16,7 +16,7 @@ const tweened = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(() => props.value, (n) => {
|
watch(() => props.value, (n) => {
|
||||||
gsap.to(tweened, { duration: 0.5, number: Number(n) || 0 });
|
gsap.to(tweened, { duration: 1, number: Number(n) || 0 });
|
||||||
}, {
|
}, {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user