Based on vue-smooth-scrollbar
- Vue 3
NPM
npm install vue3-smooth-scrollbar # yarn add vue3-smooth-scrollbar
App.vue
<template>
<scrollbar>
<!-- content -->
</scrollbar>
</template>
<script>
import Scrollbar from "vue3-smooth-scrollbar";
export default {
components: { Navbar, Scrollbar },
};
</script>
Add to your styles
body {
overflow: hidden;
}
// Assuming you're using default mount element
#app {
height: 100vh;
overflow: auto;
}
npm run install
npm run serve
npm run build
npm run lint