import { computed, ref } from "vue"; import { createGlobalState } from "@vueuse/core"; export const useGlobalInfo = createGlobalState(() => { const hostObj = ref({}); // 主机数据 const applyObj = ref({}); // 应用数据 // 设置主机数据 function setHost(e) { hostObj.value = e; } // 设置应用数据 function setApply(e) { applyObj.value = e; } return { hostObj, applyObj, setHost, setApply }; });