Skip to content

Commit

Permalink
fix: 🧩 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
17359898647 committed Sep 26, 2023
1 parent 45529eb commit a3f123e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/CountTo/CountTo.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script lang="ts" setup>
import { TransitionPresets, useTransition } from '@vueuse/core'
import { isNumber } from 'lodash-es'
import { computed, onMounted, ref, watch, watchEffect } from 'vue'
import { computed, ref, watch, watchEffect } from 'vue'
defineOptions({ name: 'CountTo' })
const props = withDefaults(defineProps<Props>(), {
startValue: 0,
endValue: new Date().getFullYear(),
duration: 0,
duration: 1000,
autoplay: true,
decimals: 0,
prefix: '',
Expand Down Expand Up @@ -61,7 +61,7 @@ function run() {
disabled,
duration: props.duration,
onStarted: () => emit('started'),
onFinished: () => emit('started'),
onFinished: () => emit('finished'),
...(props.useEasing ? { transition: TransitionPresets[props.transition] } : {}),
})
}
Expand Down Expand Up @@ -99,7 +99,7 @@ watchEffect(() => {
source.value = props.startValue
})
onMounted(() => {
tryOnMounted(() => {
if (props.autoplay)
start()
})
Expand Down

0 comments on commit a3f123e

Please sign in to comment.