Vuex 使用笔记

  在使用Vuex之前需要使用Vue声明组件  Vue.use(Vuex) let store = new Vuex.store({     state,// Vuex中保存数据      mutations, // 对Vuex中的state中的数据进行操作      actions, //使用 commit() 对mutations操作     getters //类似于computed计算属性
相关文章
相关标签/搜索