ptut-vhost/webpack/vue/menu.vue

29 lines
446 B
Vue
Raw Permalink Normal View History

<template>
<div id='side-menu'>
<div v-for='(item, index) in gstore.menu_item'
:class="(index == gstore.menu_item_active) ? 'item active' : 'item'"
@click='navigate(index)'
:data-icon='item.icon'>
<span>{{ item.label }}</span>
</div>
</div>
</template>
<script>
export default {
name: 'MENU',
data(){ return { gstore: gstore.get }; },
methods: {
navigate(uri){
document.location = '/'+uri+'/';
}
}
}
</script>