vue-vben-admin/src/store/index.ts

22 lines
474 B
TypeScript
Raw Normal View History

2020-09-28 20:19:10 +08:00
import type { App } from 'vue';
2020-10-08 01:35:05 +08:00
import {
createStore,
// createLogger, Plugin
} from 'vuex';
2020-09-28 20:19:10 +08:00
import { config } from 'vuex-module-decorators';
import { isDevMode } from '/@/utils/env';
config.rawError = true;
const isDev = isDevMode();
2020-10-08 01:35:05 +08:00
// const plugins: Plugin<any>[] = isDev ? [createLogger()] : [];
2020-09-28 20:19:10 +08:00
const store = createStore({
modules: {},
strict: isDev,
2020-10-08 01:35:05 +08:00
// plugins,
2020-09-28 20:19:10 +08:00
});
export function setupStore(app: App<Element>) {
app.use(store);
}
export default store;