2020-10-02 07:13:14 +00:00
|
|
|
import { store } from 'quasar/wrappers';
|
|
|
|
import Vuex from 'vuex';
|
|
|
|
|
|
|
|
// import example from './module-example';
|
|
|
|
// import { ExampleStateInterface } from './module-example/state';
|
|
|
|
|
|
|
|
/*
|
|
|
|
* If not building with SSR mode, you can
|
|
|
|
* directly export the Store instantiation
|
|
|
|
*/
|
|
|
|
|
|
|
|
export interface StateInterface {
|
|
|
|
// Define your own store structure, using submodules if needed
|
|
|
|
// example: ExampleStateInterface;
|
|
|
|
// Declared as unknown to avoid linting issue. Best to strongly type as per the line above.
|
|
|
|
example: unknown;
|
|
|
|
}
|
|
|
|
|
2020-10-12 21:49:05 +00:00
|
|
|
export default store(function({ Vue }) {
|
2020-10-02 07:13:14 +00:00
|
|
|
Vue.use(Vuex);
|
|
|
|
|
|
|
|
const Store = new Vuex.Store<StateInterface>({
|
|
|
|
modules: {
|
|
|
|
// example
|
|
|
|
},
|
|
|
|
|
|
|
|
// enable strict mode (adds overhead!)
|
|
|
|
// for dev mode only
|
|
|
|
strict: !!process.env.DEV
|
|
|
|
});
|
|
|
|
|
|
|
|
return Store;
|
|
|
|
});
|