Blame view

src/store/index.ts 474 Bytes
陈文彬 authored
1
import type { App } from 'vue';
2
3
4
5
import {
  createStore,
  // createLogger, Plugin
} from 'vuex';
陈文彬 authored
6
7
8
9
10
import { config } from 'vuex-module-decorators';
import { isDevMode } from '/@/utils/env';

config.rawError = true;
const isDev = isDevMode();
11
// const plugins: Plugin<any>[] = isDev ? [createLogger()] : [];
陈文彬 authored
12
13
14
15

const store = createStore({
  modules: {},
  strict: isDev,
16
  // plugins,
陈文彬 authored
17
18
19
20
21
});
export function setupStore(app: App<Element>) {
  app.use(store);
}
export default store;