Skip to content

Commit

Permalink
feat: fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuzhh committed Nov 22, 2024
1 parent 3ffa6fd commit 2a72f25
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,10 @@ export function getDefaultOptions ({ type, rawOptions = {}, currentInject }) {
headerTintColor: pageConfig.navigationBarTextStyle || 'white'
})
if (__mpx_mode__ === 'android') {
ReactNative.StatusBar.setBarStyle(pageConfig.barStyle || 'dark-content') // 控制statusbar背景颜色
ReactNative.StatusBar.setBarStyle(pageConfig.barStyle || 'dark-content')
ReactNative.StatusBar.setTranslucent(isCustom) // 控制statusbar是否占位
const color = isCustom ? 'transparent' : pageConfig.statusBarColor
color && ReactNative.StatusBar.setBackgroundColor(color) // 控制statusbar背景颜色
color && ReactNative.StatusBar.setBackgroundColor(color)
}
}, [])

Expand Down

0 comments on commit 2a72f25

Please sign in to comment.