123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- import { store } from 'quasar/wrappers'
- import { InjectionKey } from 'vue'
- import {
- createStore,
- Store as VuexStore,
- useStore as vuexUseStore,
- } from 'vuex'
- export interface StateInterface {
-
-
-
- example: unknown
- }
- declare module '@vue/runtime-core' {
- interface ComponentCustomProperties {
- $store: VuexStore<StateInterface>
- }
- }
- export const storeKey: InjectionKey<VuexStore<StateInterface>> = Symbol('vuex-key')
- export default store(function () {
- const Store = createStore<StateInterface>({
- modules: {
-
- },
-
-
- strict: !!process.env.DEBUGGING
- })
- return Store;
- })
- export function useStore() {
- return vuexUseStore(storeKey)
- }
|