Closed wenjunzhangp closed 4 years ago
countup.js version 2.0.7
countup.js
2.0.7
vue-countup-v2 version 4.0.0
vue-countup-v2
4.0.0
代码如下:
import ICountUp from 'vue-countup-v2'; components: { ICountUp }, <ICountUp :startVal="0" :endVal="88.25" :decimalPlaces="2" :duration="2" :options="options" />
效果图:
我好像知道原因了,4.0.0的版本中跟本没有 decimalPlaces 这个属性
decimalPlaces
解决办法是在 options 中定义 decimalPlaces 字段。
options
Why was this not documented? How do I pass a dynamic value when that is the only option I need to change on the fly?
countup.js
version2.0.7
vue-countup-v2
version4.0.0
代码如下:
效果图: