How do I destroy a plug-in in vue?

I used the full screen scrolling plugin on the home page, but I wanted to destroy it before leaving the page, so I wrote

normally it doesn"t matter, but when I change the size of the browser window, the scroll bar disappears, and the content beyond does not display properly and does not scroll properly. How to destroy a plug-in correctly when leaving the page? (I"ve tried to change destroed to BeforeDestrory, but it hasn"t been solved.)


v-if is not allowed?


will your plug-in generate something on the page when it is used, such as back to the top button or scroll bar? if there is a similar situation, when you destroy the plug-in instance, these generated dom may not be destroyed, but these dom element binding methods have been destroyed, so an error will be reported.


I don't understand, I am Mr. Soy Sauce

Menu