Skip to content

Commit

Permalink
补充windowstatusbar
Browse files Browse the repository at this point in the history
  • Loading branch information
wangcuijuan committed Dec 3, 2024
1 parent f0009cd commit b0a6f9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions packages/api-proxy/src/platform/api/system/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { getWindowInfo, getLaunchOptionsSync, getEnterOptionsSync } from './rnSy

const getSystemInfoSync = function () {
const windowInfo = getWindowInfo()
const { screenWidth, screenHeight, safeArea } = windowInfo
const { screenWidth, screenHeight } = windowInfo

const result = {
brand: DeviceInfo.getBrand(),
model: DeviceInfo.getModel(),
system: `${DeviceInfo.getSystemName()} ${DeviceInfo.getSystemVersion()}`,
platform: DeviceInfo.isEmulatorSync() ? 'emulator' : DeviceInfo.getSystemName(),
deviceOrientation: screenWidth > screenHeight ? 'portrait' : 'landscape',
statusBarHeight: safeArea.top,
fontSizeSetting: PixelRatio.getFontScale(),
...windowInfo
}
Expand Down
1 change: 1 addition & 0 deletions packages/api-proxy/src/platform/api/system/rnSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const getWindowInfo = function () {
screenWidth: screenWidth,
screenHeight: screenHeight,
screenTop: screenHeight - windowHeight,
statusBarHeight: safeArea.top,
safeArea
}
return result
Expand Down

0 comments on commit b0a6f9a

Please sign in to comment.