diff --git a/store/index.uts b/store/index.uts index df8e5b1abc8146235497420ab7b417005dc88b62..b6dda9cf9fbbfad1ec81c076a64c7433288be81e 100644 --- a/store/index.uts +++ b/store/index.uts @@ -14,12 +14,15 @@ type State = { safeArea : SafeArea // 设备像素比 devicePixelRatio : number + // 事件判断回调 + eventCallbackNum: number } export const state = reactive({ lifeCycleNum: 0, statusBarHeight: 0, - devicePixelRatio: 1, + devicePixelRatio: 1, + eventCallbackNum: 0, safeArea: { top: 0, right: 0, @@ -32,6 +35,10 @@ export const state = reactive({ export const setLifeCycleNum = (num : number) => { state.lifeCycleNum = num +} + +export const setEventCallbackNum = (num : number) => { + state.eventCallbackNum = num } export const setStatusBarHeight = (height : number) => { @@ -45,3 +52,4 @@ export const setSafeArea = (value : SafeArea) => { export const setDevicePixelRatio = (devicePixelRatio : number) => { state.devicePixelRatio = devicePixelRatio } +