on scroll in NUXT js but unfortunately couldnt fine information, sorry i can understand russian but can't write good therefore using english, can some one help me ? please brothers
Why don't you write your own? You need it just to indicate where is the end of the page?
i did but it isnt work live which means on scroll, it works when i refresh page
You need to add listeners after the page rendered and loaded on client, not after server rendering
now i show my code bro
Sure, it would easier to help) but I have to go, I'll check it later, or mb somebody here will help you before it
a u free now bro ?
you just need to use customized component in nuxt-loading, set it in nuxt.config.js like this: loading: '~/components/layout/progress/TheProgress.vue',
It's still not, but I checked your code a little, in computed property u r using calculations with window properties, but they r not reactive, it's why it's working only on reloading page
how can i do reactive
U need to create a variable, and add on scroll listener after page loaded with function, that will calculate the same in your current computed prop and write the result in that new variable
Like here https://stackoverflow.com/questions/50490561/computed-property-reactive-to-window-innerwidth-in-vuejs
this is too with events
It's the same with intervals, observers and other in vue - on page destroying u need to clear all that shit by yourself, to prevent memory leaks
yep, it done already in component
Yeah, cool, I just didn't check your code)
you too bro, thanks
Обсуждают сегодня