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