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',
|
label: 'Profil',
|
||||||
icon: 'profile'
|
icon: 'profile'
|
||||||
}, inbox: {
|
}, inbox: {
|
||||||
label: 'Boîte de réception',
|
label: 'Messagerie instantannée',
|
||||||
icon: 'messages'
|
icon: 'messages'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,8 +22,9 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
navigate_menu(page){
|
navigate_menu(page){
|
||||||
|
|
||||||
// (1) Manage action
|
// (1) Update URL
|
||||||
console.log('Loading page \''+page+'\'');
|
console.log('Loading page \''+page+'\'');
|
||||||
|
window.history.pushState(page, page, '/'+page+'/');
|
||||||
|
|
||||||
// (2) Activate current element
|
// (2) Activate current element
|
||||||
this.gstore.menu_item_active = page;
|
this.gstore.menu_item_active = page;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<menu-comp></menu-comp>
|
<menu-comp></menu-comp>
|
||||||
|
|
||||||
<!-- Container -->
|
<!-- Container -->
|
||||||
<message-container></message-container>
|
<message-container v-show="gstore.menu_item_active == 'inbox'"></message-container>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue