brandiqa / vuex-counter-todo

Getting Started with Vuex: Example Project
0 stars 5 forks source link

vuex namespaced #1

Open zengxiangqiu opened 4 years ago

zengxiangqiu commented 4 years ago
 ...mapActions('todo', [
      'addItem',
    `]),
new Vuex.Store({ modules:{todo: {
   namespaced:true,
    state: ()=>({
    items: [
      {
        name: "Milk",
        done: false
      },
      {
        name: "Bread",
        done: true
      },
      {
        name: "Cake",
        done: false
      }
    ]
  }),
......
brandiqa commented 4 years ago

Can you elaborate?