Commiting in order to switch computers
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
<template>
|
||||
<nav class="side-bar">
|
||||
<div v-for="(section, index) in sections" :key="index">
|
||||
<SideBarItem class="item" :icon="section.icon" :title="section.title" />
|
||||
<SideBarItem
|
||||
class="item"
|
||||
:icon="section.icon"
|
||||
:title="section.name"
|
||||
:click="launchItem"
|
||||
/>
|
||||
<SideBarSection v-if="isOpen" :items="section.items" />
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
@@ -9,6 +15,7 @@
|
||||
<script>
|
||||
|
||||
import SideBarItem from '@/components/Workspace/SideBarItem.vue';
|
||||
import SideBarSection from '@/components/Workspace/SideBarSection.vue';
|
||||
|
||||
export default {
|
||||
name: 'SideBar',
|
||||
@@ -16,8 +23,19 @@ export default {
|
||||
props: {
|
||||
sections: Array,
|
||||
},
|
||||
data: () => ({
|
||||
isOpen: false,
|
||||
}),
|
||||
components: {
|
||||
SideBarItem,
|
||||
SideBarSection,
|
||||
},
|
||||
methods: {
|
||||
launchItem() {
|
||||
this.isOpen = !this.isOpen;
|
||||
// Open SideBarSection, passing in items[]
|
||||
// this.$emit('launch', url);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user