0.2.2 • Published 7 years ago

v-scroll v0.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

v-scroll

基于better-scroll滚动指令

安装

npm install v-scroll --save

立即使用

import Vue from 'vue'
import vscroll from 'v-scroll'
Vue.use(vscroll)
<div id="app" v-scroll>
    <div id="inner">
      //.....
    </div>
</div>

选项

  • method: 指令创建时的钩子函数
  • opts: 选项对象
<div id="app" v-scroll="{method:appScroll, opts:appScrollOpts ">
    <div id="inner">
      
    </div>
</div>
new Vue({
    data(){
        return {

            //这里设置选项对象
            appScrollOpts: {
                click: true,
                probeType: 3
            }
        }
    },
    methods: {
        appScroll(scroll){

            //滚动对象实例
            console.log(scroll)
        }
    }
}).$mount("#app")

选项对象参见这里

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago