fix #236
Former-commit-id: db322a1e24a6a230abfe0d8a9048aa2bdceb40c5 Former-commit-id: d2e563462ebf285038eecf629c1a6b8c3f538360 Former-commit-id: 32b369d2c6a09f4a34824cb9c36f664097a4e20c Former-commit-id: 733f7be989504cac791159c61bd03214dfe14302 [formerly aab29fb39b1ea444774e85a2702016efde0f1360] Former-commit-id: c2fc9123a08ef72a299473c3ed459b7614de648d Former-commit-id: 620019ead1e8befb6eca3b1ac4fad7f38eecbf63 Former-commit-id: 1fd979ca052431d0a47a2544eefafd9a0592c1cf Former-commit-id: aeb7be4633754092d1a722a1cd0ea970d4667f5c Former-commit-id: 74a425066c216ec93f57d07f71f10d0a39398f1f
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// https://github.com/inorganik/CountUp.js
|
||||||
import { CountUp } from 'countup.js'
|
import { CountUp } from 'countup.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'd2-count-up',
|
name: 'd2-count-up',
|
||||||
@@ -57,14 +58,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
init () {
|
init () {
|
||||||
if (!this.c) {
|
if (!this.c) {
|
||||||
this.c = new CountUp(
|
this.c = new CountUp(this.$el, this.end, {
|
||||||
this.$el,
|
startVal: this.start,
|
||||||
this.start,
|
decimalPlaces: this.decimals,
|
||||||
this.end,
|
duration: this.duration,
|
||||||
this.decimals,
|
...this.options
|
||||||
this.duration,
|
})
|
||||||
this.options
|
|
||||||
)
|
|
||||||
this.c.start(() => {
|
this.c.start(() => {
|
||||||
this.callback(this.c)
|
this.callback(this.c)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user