/* * @Author: 张嘉彬 * @Date: 2021-09-28 14:42:15 * @Description: */ import Vue from 'vue' import Vuex from 'vuex' import app from './modules/app' import getters from './getters' import createLogger from 'vuex/dist/logger' const isDev = process.env.NODE_ENV === 'development' Vue.use(Vuex) const store = new Vuex.Store({ modules: { app }, strict: isDev, // 严格模式,禁止在actions中修改state中的数据 getters, plugins: isDev ? [createLogger()] : [] }) export default store