列表
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user