main/view/vue/menu.vue

28 lines
547 B
Vue
Raw Normal View History

2017-12-01 14:47:28 +00:00
<template>
<div id='MENU'>
<div v-for='(item, index) in gstore.menu_item' class='menu-item-wrapper'>
<div :class="(index == gstore.menu_item_active) ? 'menu-item active' : 'menu-item'" @click='navigate(index)' :style='"background-image: url(/image/menu/" + item.icon + ".svg@333333"'>
<span>{{ item.label }}</span>
</div>
2017-12-01 14:47:28 +00:00
</div>
</div>
</template>
<script>
export default {
name: 'MENU',
data(){ return { gstore: gstore.data }; },
2017-12-01 14:47:28 +00:00
methods: {
navigate(uri){
this.gstore.func.nav(this.$router, uri);
2017-12-01 14:47:28 +00:00
}
}
}
</script>