Socket
Socket
Sign inDemoInstall

vue-scroll

Package Overview
Dependencies
10
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-scroll

scroll directive for vuejs 2.0


Version published
Weekly downloads
13K
decreased by-15.79%
Maintainers
1
Install size
24.0 kB
Created
Weekly downloads
 

Readme

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

Standalone

Standalone bundle is not support on latest v2.1.0 currently

Simple download from releases and include it in script tag.

Get started

import Vue from 'vue'
import vuescroll from 'vue-scroll'

Vue.use(vuescroll)

Directive v-scroll then can be used in any of your Component.

<template>
  <ul v-scroll="onScroll">
    <li></li>
  </ul>
</template>
...

Method onScroll receives two arguments once scroll event is fired,

  • e - event
  • position - Object contains scrolling data
    • scrollTop Number
    • scrollLeft Number

Advanced

throttle and debounce are supported since v2.1.0, you can enable it as global configurations like:

Vue.use(vuescroll, {throttle: 600})
//Or
Vue.use(vuescroll, {debounce: 600})

Override global configurations like

<ul v-scroll:throttle="{fn: onScroll, throttle: 500 }">
<ul v-scroll:debounce="{fn: onScroll, debounce: 500 }">

Demo

You please try the demo hosted on codesandbox: https://codesandbox.io/s/vuescroll-demo-orders-view-f4d3d?fontsize=14

LICENSE

MIT

Keywords

FAQs

Last updated on 04 Nov 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc