1.0.2 • Published 5 years ago
h5-vue-scroller v1.0.2
🏠 Homepage
Install
npm i h5-vue-scroller
or
yarn add h5-vue-scroller
Usage
import Vue from 'vue'
import VScroller from 'h5-vue-scroller'
Vue.component(VScroller.name, VScroller)
<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!Feel free to check issues page.
Show your support
Give a ⭐️ if this project helped you!
License
This README was generated with ❤️ by readme-md-generator
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago
0.1.22
5 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.19
5 years ago
0.1.18
5 years ago
0.1.17
5 years ago
0.1.16
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago