프로젝트
GitHub에서 보기
xlsdg/vue-countup-v2
소개
countUp.js를 감싼 Vue.js 컴포넌트
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalvue-countup-v2
Vue.js component wrap for CountUp.js
Installation
$ npm install --save countup.js vue-countup-v2
Usage
<template>
<div class="iCountUp">
<ICountUp
:delay="delay"
:endVal="endVal"
:options="options"
@ready="onReady"
/>
</div>
</template>
<script type="text/babel">
import ICountUp from 'vue-countup-v2';
export default {
name: 'demo',
components: {
ICountUp
},
data() {
return {
delay: 1000,
endVal: 120500,
options: {
useEasing: true,
useGrouping: true,
separator: ',',
decimal: '.',
prefix: '',
suffix: ''
}
};
},
methods: {
onReady: function(instance, CountUp) {
const that = this;
instance.update(that.endVal + 100);
}
}
};
</script>
<style scoped>
.iCountUp {
font-size: 12em;
margin: 0;
color: #4d63bc;
}
</style>
Properties
delay[Number]Optional;
endVal[Number]Required; The value you want to arrive at.
options[Object]Optional; Formatting/easing options object.
See more countUp.js
Static Methods
startpauseResumeresetupdate
Learn more countUp.js
License
MIT
관련 프로젝트 살펴보기
불러오는 중…