2018-12-06 18:45:40 +00:00
|
|
|
<template>
|
|
|
|
<div class="layout-sidebar">
|
2018-12-06 19:23:02 +00:00
|
|
|
<div class="layout-menu">
|
|
|
|
<a @click="toggleMenu($event, 0)" :class="{'active-menuitem': activeMenuIndex === 0}">
|
|
|
|
<img alt="input" class="layout-menu-icon-inactive" src="./assets/images/menu/input.svg" />
|
|
|
|
<img alt="input" class="layout-menu-icon-active" src="./assets/images/menu/input-active.svg" />
|
|
|
|
<span>Input</span>
|
|
|
|
</a>
|
|
|
|
<div :class="{'submenuhide': activeMenuIndex !== 0, 'submenushow': activeMenuIndex === 0}">
|
|
|
|
<div>
|
|
|
|
<router-link to="/inputtext">● InputText</router-link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a @click="toggleMenu($event, 1)" :class="{'active-menuitem': activeMenuIndex === 1}">
|
|
|
|
<img alt="button" class="layout-menu-icon-inactive" src="./assets/images/menu/button.svg" />
|
|
|
|
<img alt="button" class="layout-menu-icon-active" src="./assets/images/menu/button-active.svg" />
|
|
|
|
<span>Button</span>
|
|
|
|
</a>
|
|
|
|
<div :class="{'submenuhide': activeMenuIndex !== 1, 'submenushow': activeMenuIndex === 1}">
|
|
|
|
<div>
|
|
|
|
<router-link to="/button">● Button</router-link>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-06 18:45:40 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2018-12-06 19:23:02 +00:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
activeMenuIndex: null
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
toggleMenu(event, index) {
|
|
|
|
this.activeMenuIndex = index;
|
|
|
|
}
|
|
|
|
}
|
2018-12-06 18:45:40 +00:00
|
|
|
}
|
|
|
|
</script>
|