14 lines
207 B
JavaScript
14 lines
207 B
JavaScript
import Vue from 'vue';
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state: {
|
|
itemsById: {},
|
|
},
|
|
mutations: {
|
|
addItem: ({ itemsById }, item) => {
|
|
Vue.set(itemsById, item.id, item);
|
|
},
|
|
},
|
|
};
|