1.0.5 • Published 5 years ago

vue-scroller-loading v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

vue-scroller-loading vue

Vue Scroller Loading support smooth scroll, pull to refresh & infinite loading.

Reference

See also Vue-Scroller doing recursion instead of timer(setInterval) to improve performance.

Demo

https://lzyerliu.github.io/vue-scroller-loading

Usage

# install
npm install vue-scroller-loading -S (or cnpm install vue-scroller-loading -S)
/* ignore this if you include vue-scroller.js by <script> tag from a cdn, such as unpkg */
import Vue from 'vue'
import Scroller from 'vue-scroller-loading'
Vue.use(Scroller)
<scroller
  :on-refresh="refresh"
  :on-infinite="infinite"
> 
  <!-- content to here -->
</scroller>

API

vue-scroller-loading component attributes:

Attr. NameDescriptionRequiredDefault Value
onRefreshpull to refresh callbackN-
onInfiniteinfinite loading callbackN-
refreshTexttips of pull-to-refreshN下拉刷新
releaseTexttips of pull-to-refreshN松开更新
noDataTexttips of no-more-data when infinite-loading finishedN没有更多数据
widthscroller container widthN100%
heightscroller container heightN100%
snappingenable snapping modeNfalse
snappingWidthsnapping widthN100 (stand for 100px)
snappingHeightsnapping heightN100
refreshLayerColortext color of pull-to-refresh layerN#999
loadingLayerColortext color of infinite-loading layerN#999
minContentHeightmin content height (px) of scroll-contentN0