import {ref} from 'vue' import {createGlobalState, useStorage} from "@vueuse/core"; import {uniStorage} from "@/utils/uniStorage"; export const useStatus =createGlobalState(()=>{ const currentNavbar=ref({title:'',url:''}) const applyTabbarIndex=ref(0) const statusBarHeight = ref(window?.plus?.navigator?.getStatusbarHeight() ?? 0) const tabBarIndex = useStorage('tabBarIndex', 0, uniStorage) return { statusBarHeight, applyTabbarIndex, currentNavbar, tabBarIndex } })