Blame view

src/store/index.ts 479 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

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