Skip to content

Latest commit

 

History

History
33 lines (31 loc) · 865 Bytes

README.md

File metadata and controls

33 lines (31 loc) · 865 Bytes

Vue-scrollbars

A scrollbar based on jquery.scrollbar.js, which wrapped by Vue shell.

How to use

  • Installation
    npm install vue-scrollbars --save
    
  • Usage
    • entry.js
    //Step 1: Import plugin and registry directive
    import Bar from "vue-scrollbars"
    import "vue-scrollbars/dist/bundle.css"
    Vue.use(Bar);
    
    • yourfile.vue
    <template>
        <div v-bar={onInit:yourmethod} class="scrollbar-dynamic box">
            some contents here...
            <scrollbar @onInit="yourmethod">
                <div class="scrollbar-inner box">Another contents here...</div>
            </scrollbar>
        </div>
    </template>
    <style scoped>
        .box {
            height: 500px; // It must specify the height
        }
    </style>