40 lines
876 B
Vue
40 lines
876 B
Vue
<template>
|
|
|
|
<div id='HEADER'>
|
|
|
|
<!-- Header Icon+Title -->
|
|
<div id='header-icon' @click='gstore.func.toggleMenuSize'>
|
|
<div class='header-title'>{{ gstore.header_title }}</div>
|
|
</div>
|
|
|
|
<!-- Header Info -->
|
|
<div id='header-info' v-show='gstore.info.active' :class='gstore.info.type'>{{ gstore.info.message }}</div>
|
|
|
|
<!-- Header Notif -->
|
|
<div id='header-notif'>
|
|
<div v-for='(notif, index) in gstore.notif' @click='show_notif(index, notif.link)' :class='"hnotif " + notif.class' :data-count='notif.count'></div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
export default {
|
|
name: 'HEADER',
|
|
data(){ return { gstore: window.gstore.data }; },
|
|
methods: {
|
|
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;
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
</script> |