You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importReactfrom'react';import{View,StyleSheet,Text}from'react-native';import{Tabs}from'@ant-design/react-native';exportdefaultclassApprovalPendingListScreenextendsReact.Component{constructor(props){super(props);this.state={tabs: [{title: '已发起'},{title: '待处理'},{title: '已处理'}],};}render(){const{tabs}=this.state;return(<Viewstyle={styles.container}><Tabstabs={tabs}><Viewstyle={styles.tab}><Text>Content of First Tab</Text></View><Viewstyle={styles.tab}><Text>Content of Second Tab</Text></View><Viewstyle={styles.tab}><Text>Content of Third Tab</Text></View></Tabs></View>);}}conststyles=StyleSheet.create({container: {flex: 1,backgroundColor: 'green'},tab:{flex: 1,backgroundColor: 'black'},});
Reproduction link
Steps to reproduce
android真机调试,关闭app后重新打开,底部有绿色横条
What is expected?
黑色view铺满
What is actually happening?
底部有绿色横条
使用了@react-navigation/bottom-tabs 底部导航,在初始页打开之后底部导航占用过高高度,自适应调整后恢复正常,tabs的高度会刷新,但是里面的view高度少了一截
import React from 'react';
import {View, StyleSheet, Text} from 'react-native';
import {Tabs} from '@ant-design/react-native';
export default class ApprovalPendingListScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
tabs: [{title: '已发起'}, {title: '待处理'}, {title: '已处理'}],
};
}
render() {
const {tabs} = this.state;
return (
Content of First Tab
Content of Second Tab
Content of Third Tab
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'green'
},
tab:{
flex: 1,
backgroundColor: 'black'
},
});
The text was updated successfully, but these errors were encountered: