const getDefaultState = () => { return { // type = node ? relation type: 'node', data: {} } } const state = getDefaultState() const mutations = { RESET_KG: (state) => { state.type = 'node' state.data = {} // state = getDefaultState() // console.log('mutation', state) }, SET_KG: (state, obj) => { state.type = obj.type state.data = obj.item }, SET_VALUE: (state, obj) => { for(let i=0; i { let properties = state.data.properties let index = -1 for(let i=0; i