Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I know if a Vue Nuxt animation is loaded? #327

Open
fenn1ks opened this issue Jun 25, 2024 · 1 comment
Open

How do I know if a Vue Nuxt animation is loaded? #327

fenn1ks opened this issue Jun 25, 2024 · 1 comment

Comments

@fenn1ks
Copy link

fenn1ks commented Jun 25, 2024

How can I access the event in Vue Nuxt when the animation is loaded? I want to make a loading preloader before it is loaded, and after the animation is loaded show it

@fenn1ks
Copy link
Author

fenn1ks commented Jun 26, 2024

And so, I decided this way, maybe it will be useful to someone

      <dotlottie-player
        v-show="lottieLoad"
        ref="lottieplayer"
        autoplay
        loop
        mode="normal"
      />
      const lottie = await this.$refs.lottieplayer
        lottie.addEventListener('ready', () => {
          this.lottieLoad = true
        })
        lottie.load(this.lottieSrc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant