# vscroller

> vue scroller infiniteload

Latest version **1.0.1** (published 2017-04-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install vscroller
pnpm add vscroller
yarn add vscroller
bun add vscroller
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2017-04-18 |
| First published | 2017-04-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | yanghanbin |
| Maintainers | yanghanbin |
| Keywords | vue, scroller, infiniteload |

## Links

- npm: https://www.npmjs.com/package/vscroller
- Repository: https://github.com/yanghanbin-sz/vscroller
- Homepage: https://github.com/yanghanbin-sz/vscroller#readme
- Issues: https://github.com/yanghanbin-sz/vscroller/issues
- npm.io page: https://npm.io/package/vscroller

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.1.0
- [vue-router](https://npm.io/package/vue-router.md) ^2.1.0

## Recent versions

- 1.0.1 (latest) — 2017-04-18
- 1.0.0 — 2017-04-17

## README

# vscroller

## Install
```shell
npm install vscroller -S
```

## How to use

```html
<div id="app">
  <m-scroller 
    :on-refresh="refresh"
    :on-infinite="infinite"
    ref="my_scroller">
    <!-- content goes here -->

    <ul>
        <li v-for="item in items">{{item}}</li>
    </ul>
  </m-scroller>
</div>

<script>
import scroller from 'vscroller';
export default {            
    components: {
        'm-scroller': scroller
    },
    data () {
        items: []  
    },

    methods: {
        refresh: function(){

        },

        infinite: function(){
            this.fetchData();
        },

        fetchData: function(){
            //部分数据加载完成
            this.$refs.my_scroller && this.$refs.my_scroller.finishInfinite()

            //所有数据加载完成
            this.$refs.my_scroller && this.$refs.my_scroller.finishInfinite(true)
        }
    }
}
</script>

```

---
_Source: https://npm.io/package/vscroller · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
