type State = { lifeCycleNum : number, // 状态栏 + 导航栏高度 headerHeight : number, // 设备像素比 devicePixelRatio : number } export const state = reactive({ lifeCycleNum: 0, headerHeight: 0, devicePixelRatio: 1 } as State) export const setLifeCycleNum = (num : number) => { state.lifeCycleNum = num } export const setHeaderHeight = (height : number) => { state.headerHeight = height } export const setDevicePixelRatio = (devicePixelRatio : number) => { state.devicePixelRatio = devicePixelRatio
}