- Complete GGZ Ecademy Nuxt.js user portal - Learning products browser and management - Member management interface - User authentication and roles - Multi-language support (NL/EN) - Vuex store for state management - Component-based architecture
This commit is contained in:
25
store/navigation.js
Normal file
25
store/navigation.js
Normal file
@@ -0,0 +1,25 @@
|
||||
export const state = () => ({
|
||||
searchOverlay: false,
|
||||
rightDrawer: {
|
||||
display: false,
|
||||
component: null,
|
||||
subMenu: null,
|
||||
},
|
||||
});
|
||||
|
||||
export const mutations = {
|
||||
|
||||
TOGGLE_SEARCH_OVERLAY: (state, value = null) => {
|
||||
state.searchOverlay = value
|
||||
},
|
||||
|
||||
SWITCH_RIGHT_DRAWER: (state, value = true) => {
|
||||
|
||||
if (typeof value === 'boolean') { state.rightDrawer.display = value }
|
||||
else {
|
||||
state.rightDrawer.component = value.component
|
||||
state.rightDrawer.subMenu = value.subMenu
|
||||
state.rightDrawer.display = true
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user