vuex:状态管理模块
1.使用
const moduleA = new Vuex.Store({
// 保存数据
state:{ 在任何组件可以通过KaTeX parse error: Expected 'EOF', got '}' at position 82: …,10,20] }̲, // 修改s…store.commit(‘increment’)
2.his.KaTeX parse error: Expected 'EOF', got '}' at position 173: … } }̲, // 获取s…store.getters.filteredList
filteredList:state => {
return state.list.filter(item => item < 10)
}
},
// 异步提交mutation,存在业务逻辑的
action: {

   }

})

const store = new Vuex.Store({
modules:{
a:moduleA
}
})
store.state.a //