@@ -9,11 +9,12 @@ import {
99 Platform ,
1010 StatusBar ,
1111 StyleProp ,
12+ StatusBarProps ,
1213} from 'react-native' ;
1314import Icon from '../Icon' ;
1415import MaskLayer from '../MaskLayer' ;
1516
16- export interface ScreenRootProps {
17+ export interface ScreenRootProps extends StatusBarProps {
1718 /**
1819 * 无需头部导航栏
1920 */
@@ -49,6 +50,7 @@ export interface ScreenRootProps {
4950 pageType ?: 'screen' | 'modal' ;
5051 children ?: React . ReactNode ;
5152 barStyle ?: 'default' | 'light-content' | 'dark-content' ;
53+ statusBarProps ?: StatusBarProps ;
5254}
5355
5456const ScreenRoot = ( props : ScreenRootProps ) => {
@@ -79,6 +81,7 @@ const ScreenRoot = (props: ScreenRootProps) => {
7981 // 状态栏主题 default light-content dark-content
8082 barStyle = 'dark-content' ,
8183 headerRightStyle = { } ,
84+ statusBarProps = { } ,
8285 } = props ;
8386
8487 const isScreen = pageType === 'screen' ;
@@ -144,7 +147,7 @@ const ScreenRoot = (props: ScreenRootProps) => {
144147
145148 return (
146149 < SafeAreaView style = { [ isScreen ? { } : { backgroundColor : modalBackgroundColor , ...rootStyle } , { flex : 1 } ] } >
147- < StatusBar barStyle = { barStyle } backgroundColor = "red" translucent = { true } animated = { true } />
150+ < StatusBar barStyle = { barStyle } backgroundColor = "red" translucent = { true } animated = { true } { ... statusBarProps } />
148151 { loading && (
149152 < MaskLayer visible = { loading } opacity = { 0.3 } >
150153 < ActivityIndicator color = "#333" size = "large" style = { { marginTop : 300 } } />
@@ -197,7 +200,7 @@ const styles = StyleSheet.create({
197200 } ,
198201 title : {
199202 color : '#333' ,
200- fontSize : 16 ,
203+ fontSize : 17 ,
201204 fontWeight : '600' ,
202205 } ,
203206 rightContainer : {
0 commit comments