1.0.2-beta-1 • Published 1 year ago

ft-count-to v1.0.2-beta-1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

引用方式

import ftCountTo from 'ft-count-to'; // 引入的组件

const app = createApp(App);

app.use(ftCountTo).mount('#app');
...
// 组件使用
<countTo :startVal="0" :endVal="2022" :duration='3000'></countTo>
<template>
  <countTo :startVal="0" :endVal="2022" :duration='3000'></countTo>
</template>
<script setup>
  import { countTo } from 'ft-count-to';
</script>

Options

PropertyDescriptiontypedefault
startValthe value you want to begin atNumber0
endValthe value you want to arrive atNumber2022
durationduration in millisecondNumber3000
autoplaywhen mounted autoplayBooleantrue
decimalsthe number of decimal places to showNumber0
decimalthe split decimalString.
separatorthe separatorString,
prefixthe prefixString''
suffixthe suffixString''
useEasingis use easing functionBooleantrue
easingFnthe easing functionFunction

notes: when autoplay:true , it will auto start when startVal or endVal change

Functions

Function NameDescription
mountedCallbackwhen mounted will emit mountedCallback
startstart the countTo
pausepause the countTo
resetreset the countTo
1.0.2-beta-1

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago