2018-02-20 14:53:31 +00:00
|
|
|
<template>
|
|
|
|
|
2018-02-20 18:00:09 +00:00
|
|
|
<div id='side-menu'>
|
2018-02-20 14:53:31 +00:00
|
|
|
|
2018-02-20 18:00:09 +00:00
|
|
|
<div v-for='(item, index) in gstore.menu_item'
|
|
|
|
:class="(index == gstore.menu_item_active) ? 'item active' : 'item'"
|
|
|
|
@click='navigate(index)'
|
2018-02-27 13:33:04 +00:00
|
|
|
:data-icon='item.icon' :data-label='item.label'>
|
2018-02-20 14:53:31 +00:00
|
|
|
|
2018-02-27 13:33:04 +00:00
|
|
|
<!-- <span>{{ item.label }}</span> -->
|
2018-02-20 14:53:31 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'MENU',
|
|
|
|
data(){ return { gstore: gstore.get }; },
|
|
|
|
methods: {
|
|
|
|
navigate(uri){
|
2018-03-06 18:39:34 +00:00
|
|
|
// if no logout -> redirect
|
|
|
|
if( uri !== 'logout' ){
|
|
|
|
|
|
|
|
document.location = '/'+uri+'/';
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// logout call
|
|
|
|
api.call('DELETE cas', {}, function(rs){ document.location = '/'; });
|
|
|
|
|
2018-02-20 14:53:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|