zs
2025-05-06 55bf797dcc730b37bc691ebab2b51ff9db8ed245
HIAWms/web/src/libs/Store/Store.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
import { reactive, onMounted, ref, Ref } from 'vue'
import { createGlobalState } from '@vueuse/core'
declare global {
  interface Window {
    __globalState: any // å®šä¹‰ä½ è¦æš´éœ²ç»™ window çš„变量的类型
    __BaseState__: {
      workSectionList: Record<string, any>
    }
  }
}
/**
 * å…¨å±€çŠ¶æ€
 */
export const globalState = reactive<Record<string, any>>({})
/**
 * å…¨å±€hook
 * @returns
 */
export const useGlobalState = createGlobalState(() => {
  const state = {}
  return state
})