Currently, in my Vue application, whenever I click on a <router-link>
, it directs me to the new page but at the same scroll position as the previous one. This happens because the link only replaces the component.
I am curious to know if there is a specific functionality in vue-router
that automatically scrolls the page to the top, or if I need to implement some additional JavaScript logic for this action.
Thank you in advance for your assistance.