@forzoom/scroll-listener
```shell npm install @forzoom/scroll-listener ```
Last updated 2 years ago by forzoom .
MIT · Original npm · Tarball · package.json
$ cnpm install @forzoom/scroll-listener 
SYNC missed versions from official npm registry.

Install

npm install @forzoom/scroll-listener

Usage

import Vue from 'vue';
import store from 'store/index.js'; // Vuex store instance
import ScrollListener from '@forzoom/scroll-listener';

Vue.use(ScrollListener, {
	store: store,
});

Description

添加名为'scrollListener'的Vuex module

提供 addScrollCallback cleanScrollCallbacks 两个函数

将在window上注册scroll监听,每当有scroll事件发生,将调用通过store.commit('addScrollCallback', foo);将入的foo函数

addScrollCallback

store.commit('addScrollCallback', foo);

cleanScrollCallbacks

store.commit('cleanScrollCallbacks');

Current Tags

  • 0.0.9                                ...           latest (2 years ago)

7 Versions

  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 2
This Month 3
Last Day 1
Last Week 1
Last Month 7
Dependencies (0)
None
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |