We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1713596 commit e2e5cafCopy full SHA for e2e5caf
src/store/index.js
@@ -11,6 +11,7 @@ const createStore = () => {
11
state: () => ({
12
counter: 0,
13
isUser: false,
14
+ todoItem: [],
15
}),
16
mutations: {
17
increment(state) {
@@ -19,6 +20,14 @@ const createStore = () => {
19
20
setUser(state, payload) {
21
state.isUser = payload.bool;
22
console.log('mutations');
23
+ },
24
+ setTodoItem(state, payload) {
25
+ const data = {
26
+ id: payload.id,
27
+ hexCode: payload.hexCode,
28
+ svgPath: payload.svgPath,
29
+ }
30
+ state.todoItem.push(data);
31
}
32
},
33
actions: {
0 commit comments