updated ''router'' engine (without vue-router)
This commit is contained in:
parent
19a9ab9dc4
commit
6bcc725d31
|
@ -25,7 +25,7 @@ window.gstore.add('menu_item', {
|
|||
label: 'Profil',
|
||||
icon: 'profile'
|
||||
}, inbox: {
|
||||
label: 'Boîte de réception',
|
||||
label: 'Messagerie instantannée',
|
||||
icon: 'messages'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,8 +22,9 @@ export default {
|
|||
methods: {
|
||||
navigate_menu(page){
|
||||
|
||||
// (1) Manage action
|
||||
// (1) Update URL
|
||||
console.log('Loading page \''+page+'\'');
|
||||
window.history.pushState(page, page, '/'+page+'/');
|
||||
|
||||
// (2) Activate current element
|
||||
this.gstore.menu_item_active = page;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<menu-comp></menu-comp>
|
||||
|
||||
<!-- Container -->
|
||||
<message-container></message-container>
|
||||
<message-container v-show="gstore.menu_item_active == 'inbox'"></message-container>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue