import Vue from "vue";
import Vuex from "vuex";

import * as getters from "./getters";
import * as actions from "./actions";
import * as mutations from "./mutations";

Vue.use(Vuex);

const state = {
  router: {},
  text: "",
  count: "空",
};

// 整合初始状态和变更函数，我们就得到了我们所需的 store
// 至此，这个 store 就可以链接到我们的应用中
export default new Vuex.Store({
  state,
  getters,
  actions,
  mutations,
});
