1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
| import Vue from "vue";
| import Vuex from "vuex";
| import mutations from "./mutations";
| import actions from "./actions";
|
| Vue.use(Vuex);
|
| export default new Vuex.Store({
| state: {
| loading: true,
| todos: [
| {
| title: "Have a sandwich",
| id: "123",
| complete: true,
| important: true
| },
| {
| title: "Learn VueJS",
| id: "1234",
| complete: true,
| important: false
| },
| {
| title: "EnableEnablement",
| id: "1235",
| complete: false,
| important: true
| },
| {
| title: "Have a poop",
| id: "1236",
| complete: false,
| important: false
| }
| ],
| newTodo: ""
| },
| getters: {
| newTodo: state => state.newTodo,
| todos: state => state.todos
| },
| mutations: mutations,
| actions: actions
| });
|
|