Socket
Socket
Sign inDemoInstall

vue-scroll

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-scroll

scroll directive for vuejs 2.0


Version published
Weekly downloads
21K
increased by27.42%
Maintainers
1
Weekly downloads
 
Created
Source

vue-scroll

scroll directive for vuejs 2.0

For vue 1.x, please use vue-scroll@1.0.4. Currently its code is in master branch.

NPM

Coveralls

npm package NPM downloads Average time to resolve an issue

Installation

NPM(recommended)

npm install vue-scroll --save

Standlone

Simple download from releases and include it in script tag.

Usage

It's very simple, just declar in html tags and provide a defined callback - the scroll function below.

In javasript:

new Vue({
  el: '#app',
  data: {},
  methods:{
    onScroll:function(e, position){
      this.position = position;
    }
  }
})

The function onScroll has two arguments, e is the scroll event object, position is an object which has two properties about the postion of scroll bar:

  • scrollTop type:number
  • scrollLeft type:number

In html:

<div v-scroll="onScroll">
...
</div>

Samples

LICENSE

MIT

Keywords

FAQs

Package last updated on 16 May 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