vue-keep-scroll-position
A vue 2.0 directive to keep scroll position for keep-alived components. Forked from vue-keep-scroll and rewritten for vue 2.0 compatibility.
Install
npm i -S vue-keep-scroll-position
Plug into vue
Vueuse VueKeepScrollPosition
Usage
Just add v-keep-scroll-position
to your components within <keep-alive>
. For router-view
:
For simple dynamic components: