Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-scroller

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scroller

Vue component for smooth scrolling, pull to refresh & infinite loading.

  • 2.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
663
increased by12.56%
Maintainers
1
Weekly downloads
 
Created
Source

Vue Scroller version vue

Vue Scroller is a foundational component of Vonic UI. In purpose of smooth scrolling, pull to refresh and infinite loading.

For vue 1.0, please refer to branch v1.

Demo

https://wangdahoo.github.io/vue-scroller/

How to use

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

Live Code on JsFiddle

Webpack project by vue-cli

https://github.com/wangdahoo/vue-scroller-demo

API

Scroller component attributes:
Attr. NameDescriptionRequiredDefault Value
onRefreshpull to refresh callbackN-
onInfiniteinfinite loading callbackN-
onInfiniteinfinite loading callbackN-
refreshTexttips 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#AAA
loadingLayerColortext color of infinite-loading layerN#AAA
minContentHeightmin content height (px) of scroll-contentN0
Scroller vm instance methods:
  • resize() resize scroller content (deprecated, cause the scroller'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 scroller content
  • scrollBy(x:Integer, y:Integer, animate:Boolean) scroll by a position in scroller content
  • getPosition :Object get current position of scroller content

Keywords

FAQs

Package last updated on 21 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc