dobromir-hristov / fullpage-nuxt-module

1 stars 0 forks source link

Hello, could you, please, explain in details? #2

Open BlackBiM123 opened 4 years ago

BlackBiM123 commented 4 years ago

Can you explain, How should my template look like, and what about previous module ( 'nuxt-fullpage.js' ) in nuxt.config, to remove it or not? I tried diffferent variants but no one gave me the proper result. I would really appreciate any help.!

dobromir-hristov commented 4 years ago

https://github.com/dobromir-hristov/fullpage-nuxt-module/issues/1#issuecomment-631286977

Just download the files into your project :) its a very simple "module" to say :P

BlackBiM123 commented 4 years ago

@dobromir-hristov so ... it doesnt help me, for the first visit (only if i came from another page of the site but not directly to this page) everything is ok, but after refreshing this page, scroll is not working. http://joxi.ru/RmzB7vvCRzNYLm and options again [Object Object]

dobromir-hristov commented 4 years ago

bummer :/ worked pretty alright in my tests. Can you make a minimal repo that we can try to fix with?

BlackBiM123 commented 4 years ago

ok i'll try to

BlackBiM123 commented 4 years ago

@dobromir-hristov So... step by step i removed all other pages and files from the project and found out that the problem appears not after refreshing, but after changing DOM. (in my case, it was changing in mounted hook) So I started new nuxt project with the only page and with the button that makes DOM change / after clicking FullPage says "Goodbye".

here is this test repo but thereis nothing special here https://github.com/BlackBiM123/fullpageTest and, of course, its without your module in node_modules folder

BlackBiM123 commented 4 years ago

@dobromir-hristov Аny ideas? I have a little suggestion for you, so could you give me your contacts or contact me. mail: blackbim123@gmail.com skype: blackbim1231 telegram: blackbimvl

wphubs commented 4 years ago

@BlackBiM123 Hello,I use ‘dobromir-hristov’ way,it worked in nuxt ssr,This is a complete example,You can have a look https://github.com/w405287435/nuxt_fullpageTest.git

BlackBiM123 commented 4 years ago

@w405287435 In this case, it works perfect i know. Its suitable for pictures or some text info If you have the same needs its ok for you. but if we add some dynamic logic with DOM, its not working. To try it just add div with the directive v-if depending on data. and the btn that changes this data. Pushing this btn will break all the page.

I mean this logic on any of section: div v-if="toggle">Some text button @click="toggle=!toggle">div toggle

data(){ return{ toggle:false } }

dobromir-hristov commented 4 years ago

This is an issue in all vue-fullpage, not just nuxt. I am sorry.

dobromir-hristov commented 4 years ago

The main problem is, the library changes the DOM that Vue makes. This means vue no longer has full control over what happened with its components. When you change something, vue re-renders, but at that point things are very much changed/moved around, so it sometimes breaks pretty badly.

BlackBiM123 commented 4 years ago

@dobromir-hristov Oh understood Thanks for explanations! its very bad point of the plugin, in other words its not true vue-plugin. I decided to go another way and do smth like fullpage with the help of nuxt layout / pages / transitions. So thank you for your help. I appreciate it very much!

Tabris7777 commented 2 years ago

Great plugin! Thank u very much!its work for nuxt2 if you want to use fullpage.js, vue-fullpage is not working with Nuxt2 SSR setup.