import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    bodyH: document.documentElement.clientHeight,
    reqLoading: false
  },
  mutations: {
    setReqLoading(state, data) {
      state.reqLoading = data;
    }
  },
  actions: {
    SetLoading({ commit }, flag) {
      commit('setReqLoading', flag)
    }
  }
})
