1.1.3 • Published 1 year ago

count-to-v3 v1.1.3

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

count-to-v3

vue3 component that will count to a target number at a specified duration

vue3vueuselicense

Based on vue-count-to to upgrade components, digital dynamic components

Runtime

The running environment has been tested, vue3.2 vite4.0

Install

npm install count-to-v3 --save
# or
yarn add count-to-v3 --save

Global registration

import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

import CountTo from 'count-to-v3'
createApp(App).use(CountTo).mount('#app')

Local introduction

<template>
  <CountTo :startVal="0" :endVal="2023" :decimals="2" :separator="','" prefix="$" suffix="usd" />
</template>

<script>
import { CountTo } from 'count-to-v3';

export default {
  components: {
    CountTo
  }
}
</script>

Options

PropertyDescriptiontypedefault
startValthe value you want to begin atNumber0
endValthe value you want to arrive atNumber2023
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
mountedCountTowhen mounted will emit mountedCountTo
endCountToCallbacknumber end of digital scroll emit mountedCallback
startstart the countTo
pausepause the countTo
resetreset the countTo
1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

0.0.5

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago