Closed daniel-shuy closed 6 years ago
like this:
import ICountUp from 'vue-countup-v2';
ICountUp.reset();
If a Vue Component instantiates multiple CountUp instances in its template, how would one reset only a specific CountUp?
Use ready
event to get different instances.
I see... it still feels cumbersome to have to create a data
field to store each instance.
May I suggest adding the methods to methods
so that they can be called using $refs
(similar to #2, but without removing the static methods)?
Eg.
this.$refs.userCount.reset()
You are right, I've already upgraded version to v1.0.3
.
I believe you've made a slight mistake in not putting the Vue methods in the
methods
block.