vue-slimscroll

1.0.1 • Public • Published

vue-slimscroll

Vue-slimscroll is a directive plugin for Vue.js, which can transforms any div into a scrollable area with a nice scrollbar.

The original jQuery version is herehttps://github.com/rochal/jQuery-slimScroll.

Install

  • Install it by using npm.
npm i vue-slimscroll
  • Import it at vue project.
import Vue rom 'vue'
import VueSlimScroll from 'vue-slimscroll'
...
Vue.use(VueSlimScroll)

Usage

Using the v-slimscroll directive

<template>
    <div v-slimscroll>
        ...
    </div>
</template>

Using directive with options

<template>
    <div v-slimscroll="options">
    ...
    </div>
</template>
<script>
    export default {
        data:{
            return (){
                options:{
                    height:'100%',
                    size:0
                }
            }
        }
    }
</script> 

The options is same as jQuery version. See their documentation

License

MIT

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i vue-slimscroll

      Weekly Downloads

      599

      Version

      1.0.1

      License

      MIT

      Last publish

      Collaborators

      • traveller_wjoe