修复countTo组件初始化bug

This commit is contained in:
zhigang.li 2018-08-10 17:18:36 +08:00
parent ad9922a35e
commit b13965dc8c
1 changed files with 7 additions and 7 deletions

View File

@ -152,14 +152,14 @@ export default {
},
mounted () {
this.$nextTick(() => {
let endVal = this.getValue(this.end)
this.counter = new CountUp(this.counterId, this.startVal, endVal, this.decimals, this.duration, {
useEasing: !this.uneasing,
useGrouping: this.useGroup,
separator: this.separator,
decimal: this.decimal
})
setTimeout(() => {
let endVal = this.getValue(this.end)
this.counter = new CountUp(this.counterId, this.startVal, endVal, this.decimals, this.duration, {
useEasing: !this.uneasing,
useGrouping: this.useGroup,
separator: this.separator,
decimal: this.decimal
})
if (!this.counter.error) this.counter.start()
}, this.delay)
})