pull/3/head
qiuhongwu 9 months ago
commit 7973118dde

@ -0,0 +1,23 @@
import { defineStore } from 'pinia'
import { store } from '../index'
export interface CommonStoreState {
storeMap: object
}
export const useCommonStore = defineStore('commonStore', () => {
const storeMap = ref({})
const getStore = (key) => {
return storeMap.value[key]
}
const setStore = (key, value) => {
return storeMap.value[key] = value
}
return {getStore, setStore}
})
export const useCommonStateWithOut = () => {
return useCommonStore(store)
}
Loading…
Cancel
Save