An open API service indexing awesome lists of open source software.

https://github.com/beeplin/vue-keep-scroll-position

A vue 2.0 directive to keep scroll position for keep-alived components.
https://github.com/beeplin/vue-keep-scroll-position

Last synced: 8 months ago
JSON representation

A vue 2.0 directive to keep scroll position for keep-alived components.

Awesome Lists containing this project

README

          

# vue-keep-scroll-position

A vue 2.0 directive to keep scroll position for keep-alived components. Forked from [vue-keep-scroll](https://github.com/mark-hahn/vue-keep-scroll) and rewritten for vue 2.0 compatibility.

## Install

```bash
npm i -S vue-keep-scroll-position
```

## Plug into vue

```js
import Vue from 'vue'
import VueKeepScrollPosition from 'vue-keep-scroll-position'
Vue.use VueKeepScrollPosition
```

## Usage

Just add `v-keep-scroll-position` to your components within ``. For `router-view`:

```html

```

For simple dynamic components:

```html

```