const state = { currentLayout: {}, } const getters = {} const actions = { switchLayout({ commit, state }, data) { commit('switchLayout', data) }, } const mutations = { switchLayout(state, data) { state.currentLayout = data }, } export default { namespaced: true, state, getters, actions, mutations, }