A scrollbar based on jquery.scrollbar.js, which wrapped by Vue shell.
- 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>