alvarotrigo / vue-fullpage.js

Official Vue.js wrapper for fullPage.js http://alvarotrigo.com/vue-fullpage/
GNU General Public License v3.0
1.85k stars 255 forks source link

The afterLoad callback does not work #271

Closed renjd closed 7 months ago

renjd commented 7 months ago

Description

I have followed the document requirements but failed. I am considering whether it is due to the sub components. Please provide a solution, thank you!The relevant code is placed below:

20240327184330 20240327184409

renjd commented 7 months ago

I have just started learning front-end technology, so the code is very ugly. Please understand and look forward to your reply!

alvarotrigo commented 7 months ago

You can take a look at the code of the example: https://github.com/alvarotrigo/vue-fullpage.js/tree/master/example

That's working properly. You can use it as a base to work on.

alvarotrigo commented 7 months ago

Also, you seem to be missing data-anchor on section 1.

alvarotrigo commented 7 months ago

And I see you are overwriting fullPage.js styles by using position:absolute on the slides. You shouldn't be doing that. Otherwise fullPage.js might not work as expected.

renjd commented 7 months ago

Also, you seem to be missing data-anchor on section 1.

When the fullpage component is loaded, all its subcomponents are also rendered, which means that even if I add animation elements to other pages, these animations are actually played on the first page. Therefore, sliding on to the second and third pages, the animation effect is no longer visible.

renjd commented 7 months ago

And I see you are overwriting fullPage.js styles by using position:absolute on the slides. You shouldn't be doing that. Otherwise fullPage.js might not work as expected.

Thank you for your help. The reason is that I mixed scripts for Vue2 and Vue3, which should be the reason for this. I may not be able to express myself clearly, but I am still very grateful to you and wish you a happy life! ——A freshman student from China

alvarotrigo commented 7 months ago

Awesome that you managed to find the problem! 🥳

Regards from Spain!