main/view/vue/header.vue

40 lines
876 B
Vue
Raw Normal View History

<template>
<div id='HEADER'>
2017-12-01 14:47:14 +00:00
<!-- Header Icon+Title -->
<div id='header-icon' @click='gstore.func.toggleMenuSize'>
2017-12-01 14:47:14 +00:00
<div class='header-title'>{{ gstore.header_title }}</div>
</div>
<!-- Header Info -->
2017-12-03 15:02:18 +00:00
<div id='header-info' v-show='gstore.info.active' :class='gstore.info.type'>{{ gstore.info.message }}</div>
2017-12-01 14:47:14 +00:00
<!-- Header Notif -->
<div id='header-notif'>
2017-12-04 22:29:02 +00:00
<div v-for='(notif, index) in gstore.notif' @click='show_notif(index, notif.link)' :class='"hnotif " + notif.class' :data-count='notif.count'></div>
2017-12-01 14:47:14 +00:00
</div>
</div>
</template>
<script>
export default {
2017-12-01 14:47:14 +00:00
name: 'HEADER',
2017-12-03 15:02:18 +00:00
data(){ return { gstore: window.gstore.data }; },
methods: {
2017-12-04 22:29:02 +00:00
show_notif(index, link){
// {1} Load link //
window.gstore.data.menu_item_active = link;
// {2} Reset notification count to 0 //
window.gstore.data.notif[index].count = 0;
2017-12-03 15:02:18 +00:00
}
}
}
</script>