Merge branch 'dev' of http://222.71.165.188:3000/yunxi/mes-heli into dev
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…
Reference in new issue