A scrollbar plugin allows you to customize scrollbars under Vue.js and scroll smoothly.
There are many apis that you can use them to do a lot of work.
Just changing the configuration can achieve many functions.
You can customize scroll container, scroll panel, scroll content, scrollbar...
import Vue from 'vue';
import vuescroll from 'vuescroll/dist/vuescroll-native';
// import the css file
import 'vuescroll/dist/vuescroll.css';
Vue.use(vuescroll);
<template>
<div class="demo-container">
<vue-scroll :ops="ops">
<div class="demo-content">
<span class="demo-content-text">Hello World</span>
</div>
</vue-scroll>
</div>
</template>
<script>
export default {
data() {
return {
ops: {} // Your options
};
}
};
</script>