jeneser / vue-scroll-behavior

Customize the scrolling position on route navigation. Especially hash mode.

Home Page:https://jeneser.github.io/vue-scroll-behavior

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No documentation and how to define behaviour

techntrails opened this issue · comments

There's no documentation that I can see on how to actually define if behaviour is scroll to top or preserve the scrolling

Thanks for opening an issue with me.
Right, This document needs to be improved. I added the following instructions:

vue-scroll-behavior allows you to customize the scrolling position on route navigation. Especially hash mode. You just need to tell it which routes need to be processed, and it will do that automatically

If you have some special scenes, we also provide some options, and you can manually use them to save or restore the scroll position

By default, It will scroll to the saved position. If you ignore some routes, they will directly scroll to the top. If you have some special scenes, we also provide some options, and you can manually use them to save or restore the scroll position.
But, some options, I haven't finalized yet. You can check the below issue: #3
If you have any good ideas, please let me know.

Thanks.