/* * @Description: st * @Author: ZY * @Date: 2020-12-07 10:30:20 * @LastEditors: ZY * @LastEditTime: 2021-01-08 20:46:07 */ import { createStore, createLogger } from 'vuex' import { store as app, AppStore, AppState } from './modules/app' export interface RootState { app: AppState } export type Store = AppStore> const debug = process.env.NODE_ENV !== 'production' const plugins = debug ? [createLogger({})] : [] export const store = createStore({ plugins, modules: { app } }) export function useStore(): Store { return store as Store }