# h5-vue-scroller

> Welcome to h5-vue-scroller 👋

Latest version **1.0.2** (published 2019-09-18) · MIT license · 30 weekly downloads

## Install

```sh
npm install h5-vue-scroller
pnpm add h5-vue-scroller
yarn add h5-vue-scroller
bun add h5-vue-scroller
```

## 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.2 |
| Published | 2019-09-18 |
| First published | 2019-06-27 |
| Weekly downloads | 30 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 119.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | falstack |
| Maintainers | falstack |

## Links

- npm: https://www.npmjs.com/package/h5-vue-scroller
- Homepage: https://github.com/falstack/h5-vue-scroller
- Issues: https://github.com/falstack/h5-vue-scroller/issues
- npm.io page: https://npm.io/package/h5-vue-scroller

## Dependencies (2)

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

## Recent versions

- 1.0.2 (latest) — 2019-09-18
- 1.0.1 — 2019-08-13
- 1.0.0 — 2019-08-04
- 0.1.22 — 2019-07-25
- 0.1.21 — 2019-07-24
- 0.1.20 — 2019-07-24
- 0.1.19 — 2019-07-12
- 0.1.18 — 2019-07-12
- 0.1.17 — 2019-07-11
- 0.1.16 — 2019-07-11
- 0.1.15 — 2019-07-11
- 0.1.14 — 2019-07-10
- 0.1.13 — 2019-07-10
- 0.1.12 — 2019-07-10
- 0.1.11 — 2019-07-10
- … 11 more at https://npm.io/package/h5-vue-scroller/versions

## README

<h1 align="center">Welcome to h5-vue-scroller 👋</h1>
<p>
  <img src="https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000" />
</p>

### 🏠 [Homepage](https://github.com/falstack/h5-vue-scroller)

## Install
```sh
npm i h5-vue-scroller
or 
yarn add h5-vue-scroller
```

## Usage
```javascript
import Vue from 'vue'
import VScroller from 'h5-vue-scroller'
Vue.component(VScroller.name, VScroller)
```

```vue
<v-scroller
  tag="ul"
  :preload-top="50"
  :preload-bottom="50"
  :throttle="0"
  :event-step="1"
  @top="handleScrollTop"
  @bottom="handleLoadMore"
  @refresh="handleRefresh({ offset, event })"
  @refresh-end="handleRefreshEnd"
  @scroll="handleScroll({ offsetTop, isUp })"
>
  <slot/>
</v-scroller>
```

## Props
- preload-top：触发 top 的距离（px），默认`50`
- preload-bottom：触发 bottom 的距离（px），默认`50`
- throttle: 事件派发的频率，默认`0`不限流，如果设置为 < 0，则不派发事件
- tag：指定容器的元素，默认是`div`
- event-step：事件触发的步长（px），大于这个步长才会 emit`top`和**第一次**的`refresh` 事件

## Events
- `void` @top：滚动到屏幕顶部
- `void` @bottom：滚动到屏幕底部
- `object<{ offsetTop, isUp }>` @scroll 正在滚动
- `object<{ offset, event }>` @refresh 下拉刷新
- `void` @refresh-end：下拉刷新松手


## Author

👤 **falstack <icesilt@outlook.com>**


## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/falstack/h5-vue-scroller/issues).

## Show your support

Give a ⭐️ if this project helped you!

## License
[MIT license](https://opensource.org/licenses/MIT).

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

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