Answer the question
In order to leave comments, you need to log in
How to make a sidebar on vue.js + vuex?
Good afternoon everyone. You need to insert a vue.js sidebar into the ready-made markup so that it opens and closes on click. The sidebar itself should have one div (one component) and different links that open different content when clicked. Maybe someone can you suggest tutorials, various packages at least to make a sidebar for a start?
Have a nice day, everyone
Answer the question
In order to leave comments, you need to log in
<transition name="slide">
<menu v-show="sidebarShow">
Контент...
</menu>
</transition>
<a href="#" @click.prevent="sidebarShow = !sidebarShow">Показать / Скрыть</a>
<script>
var vm = new Vue({
el:'',
data: {
'sidebarShow': false
}
})
</script>
<style>
.slide-leave-active,
.slide-enter-active {
transition: 1s;
}
.slide-enter {
transform: translate(-100%, 0);
}
.slide-leave-to {
transform: translate(-100%, 0);
}
</style>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question