{"size": 402, "ext": "js", "max_stars_repo_path": "src/store/index.js", "max_stars_repo_name": "ZCoderwj/mall", "max_stars_repo_stars_event_min_datetime": "2020-04-12T07:59:37.000Z", "max_stars_repo_stars_event_max_datetime": "2020-04-12T07:59:37.000Z", "max_issues_repo_path": "src/store/index.js", "max_issues_repo_name": "SonMelody/mall", "max_issues_repo_issues_event_min_datetime": "2021-03-10T13:27:36.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-19T00:09:43.000Z", "max_forks_repo_path": "src/store/index.js", "max_forks_repo_name": "SonMelody/mall", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 14.3571428571, "max_line_length": 35, "alphanum_fraction": 0.7064676617}
import Vue from 'vue'
import VueX from 'vuex'

import mutations from './mutations'
import actions from './actions'
import getters from './getters'

// 1.安装插件
Vue.use(VueX)

// 2创建store对象
const state = {
  cartList:[]
}

const store = new VueX.Store({
  state,
  // mutation的目的是为了修改state中的状态
  // mutations中的每一个方法尽可以完成的事件比较单一一点
  mutations,
  actions,
  getters,
})


// 3.挂载Vue实例

export default  store