UNPKG

vue-scrollbars

Version:

A light vue scrollbar comes from jquery.scrollbar.js

33 lines (31 loc) 897 B
## Vue-scrollbars A scrollbar based on [jquery.scrollbar.js](https://github.com/gromo/jquery.scrollbar), 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> ```