Answer the question
In order to leave comments, you need to log in
How to make friends Vue.js and the Simplebar library?
Good evening! I got to the task of making a custom scrollbar. A couple of libraries for this case have already been advised here. The choice fell on Simplebar. Installed it via npm. Added wrapper:
<template>
<simplebar data-simplebar-auto-hide="false">
<ul class='w-96 h-80 overflow-y-scroll position bg'>
<ListItem
v-for="item in list"
v-bind:list="item"
v-bind:key="item.index"
/>
</ul>
</simplebar>
</template>
<script>
import simplebar from 'simplebar-vue';
import 'simplebar/dist/simplebar.min.css';
import ListItem from "@/components/ListItem";
import '@/assets/fonts/font.css'
export default {
props: ["list"],
components: {
ListItem,
simplebar
},
};
</script>
Could not find a declaration file for module 'simplebar-vue'. 'd:/Web/Front-end/Vue.js/list/node_modules/simplebar-vue/dist/simplebar-vue.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/simplebar-vue` if it exists or add a new declaration (.d.ts) file containing `declare module 'simplebar-vue';`Vetur(7016)
<style scoped> .
.simplebar-scrollbar {
background-color: '#092740';
}
</style>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question