1.0.6 • Published 5 years ago

best-scroll v1.0.6

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

Best Scroll version vue

How to use

NPM

npm i best-scroll -S

js

import Vue from 'vue'
import scroll from 'best-scroll'
Vue.use(scroll)

vue

<scroll 
  :on-refresh="refresh"
  :on-infinite="infinite">
  <!-- content goes here -->
</scroll>

API

Scroll component attributes:

Attr. NameDescriptionRequiredDefault Value
onRefreshpull to refresh callbackN-
onInfiniteinfinite loading callbackN-
onScrollY-axis position callbackN-
scrollingCompletescroll end callbackN滚动完毕回调
widthscroll container widthN100%
heightscroll container heightN100%

Scroll vm instance methods:

  • resize() resize scroll content (deprecated, cause the scroll's content resizes self automatically)
  • triggerPullToRefresh() start pull-to-refresh manually
  • finishPullToRefresh() stop pull-to-refresh
  • finishInfinite(isNoMoreData :Boolean) stop infinite-loading
  • scrollTo(x:Integer, y:Integer, animate:Boolean) scroll to a position in scroll content
  • scrollBy(x:Integer, y:Integer, animate:Boolean) scroll by a position in scroll content
  • getPosition :Object get current position of scroll content
  • scrollElement(el, time, offsetX, offsetY, easing)
  • disable() disable scrolling
  • enable() enable scrolling
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.0.4

5 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago