Vue.js wrapper for perfect scrollbar
npm install vue2-perfect-scrollbarAre you looking compatible version with Vue3 ? check https://github.com/mercs600/vue3-perfect-scrollbar
Because you want to load perfect-scrollbar to your Vue project in an easy way. But also because this plugin is updated, tested and build by rollup. So you will not find any unnecessary 💩 code in this repo. I hope 🙏.
If you have any reasonable PR you are welcome 🤘
``sh`
npm install vue2-perfect-scrollbar
`sh`
yarn add vue2-perfect-scrollbar
`js
import PerfectScrollbar from 'vue2-perfect-scrollbar'
import 'vue2-perfect-scrollbar/dist/vue2-perfect-scrollbar.css'
Vue.use(PerfectScrollbar)
`
So then you can use this plugin in each component as
` Lorem Ipsum is simply dummy text of the printing and typesetting industry. html`
This plugin will generate a container with ".ps" class name, you need to customize the height of the container
`css`
/ example /
.ps {
height: 400px;
}

Install method takes additional parameters:
#### name {String}
Name of your global component.
Default: PerfectScrollbar
#### tag {String}
Tag which will be render as perfect scrollbar container
Default: div
#### watchOptions {Boolean}
Set true if you want to update perfect-scrollbar on options change
Default: false
#### options {Object}: Options
perfect-scrollbar options.
Default: {}
` Lorem Ipsum is simply dummy text of the printing and typesetting industry. html`

#### tag {String}
Tag which will be render as perfect scrollbar container
Default: div
#### watchOptions {Boolean}
Set true if you want to update perfect-scrollbar on options change
Default: false
#### options {Object}: Options
perfect-scrollbar options.
You can use Vue.js way to listen on the all perfect-scrollbar events. List of events you can find here
Simple example:
`vue
your content here
`

https://mercs600.github.io/vue2-perfect-scrollbar/. You can also fork example from codesandbox
One of simple solution to setup custom scrollbar to top when your route is changed.
1. Add perfect scrollbar as wrapper for router-view and add simple ref
`html`
2. Add watch on $route to setup scroll container to 0, when route is changed.
`js``
watch: {
$route() {
this.$refs.scroll.$el.scrollTop = 0;
}
}
