export const state = () => ({ selection: {}, }) export const mutations = { select(state, id) { state.selection = { ...state.selection, [id]: true, } }, unselect(state, id) { var selection = state.selection delete selection[id] state.selection = { ...selection } }, clearSelection(state) { state.selection = {} }, }