/*
 * @Descripttion: 状态管理
 * @version: 1.0.0
 * @Author: 无尘
 * @Date: 2020-11-24 14:03:43
 * @LastEditors: 无尘
 * @LastEditTime: 2020-11-24 14:08:19
 */
import Vuex from 'vuex';
import Vue from 'vue';

Vue.use(Vuex);
export default new Vuex.Store({
  state: {
    storeInfo: [], // 批量选择的门店信息
  },
  mutations: {
    saveStore: (state, data) => {
      state.storeInfo = data;
    },
    clearData: state => {
      state.storeInfo = [];
    },
  },
  actions: {
    saveStoreInfo(context, data) {
      context.commit('saveStore', data);
    },
    clearStoreData(context, data) {
      context.commit('clearData');
    }
  }
});
