This commit is contained in:
李瑞
2025-09-14 01:18:23 +08:00
parent c44bd01613
commit 01aad920ad
17 changed files with 569 additions and 352 deletions

View File

@@ -8,7 +8,7 @@ interface GlobalState {
getLocationText: string;
statusNavbarHeightInfo: {
statusBarHeight: number;
navbarHeight: number;
navBarHeight: number;
totalHeight: number;
};
}
@@ -33,18 +33,18 @@ export const useGlobalStore = create<GlobalStore>()((set, get) => ({
// 状态栏和导航栏高度信息
statusNavbarHeightInfo: {
statusBarHeight: 0,
navbarHeight: 0,
navBarHeight: 0,
totalHeight: 0,
},
// 获取导航栏高度信息
getNavbarHeightInfo: () => {
const { statusBarHeight, navbarHeight } = getNavbarHeight();
const { statusBarHeight, navBarHeight } = getNavbarHeight();
set({
statusNavbarHeightInfo: {
statusBarHeight,
navbarHeight,
totalHeight: statusBarHeight + navbarHeight,
navBarHeight,
totalHeight: statusBarHeight + navBarHeight,
},
});
},