egidiusmengelberg / nuxt-aos

A Nuxt module that adds Animate On Scroll
https://www.npmjs.com/package/nuxt-aos
MIT License
67 stars 5 forks source link

nuxt3 option set once: true, first render page no problem but not work after change router #27

Open yanggengzhen123 opened 6 months ago

yanggengzhen123 commented 6 months ago

nuxt3 option set once: true, first render page no problem but not work after change router. my requirement is make a effectiveness again after change router again, thanks

egidiusmengelberg commented 6 months ago

I don't really understand what you're asking. do you have a code sample?

yanggengzhen123 commented 6 months ago

Only problem is that it will only show the animation on the first visit on every page (or again after a refresh), but when navigating to a page more than once it seems to remember that it already did the animation and is not doing the animation again. Probably something todo with how nuxt/vue is rendering the DOM.. Not sure if there is a fix for that problem.. link: https://github.com/michalsnik/aos/issues/794

yanggengzhen123 commented 6 months ago

how can i refresh the animation when i change navigating again? aos.refresh is not work

Nebual commented 2 months ago

I was experiencing the same issue on the latest v1.2.5, and ended up fixing it by ensuring my page has a "single root component" (as Nuxt warns in the browser console upon transition). Might help!

BayBreezy commented 2 weeks ago

I was experiencing the same issue on the latest v1.2.5, and ended up fixing it by ensuring my page has a "single root component" (as Nuxt warns in the browser console upon transition). Might help!

@yanggengzhen123 did this help?