请帮助,我将首先通过显示代码进行解释:
home.js
onHelpPagePress() {
Promise.all([
AntDesign.getImageSource('arrowleft', 25)
]).then((sources) => {
Navigation.setRoot({
root: {
stack: {
children: [{
component: {
name: 'projectName.HelpPage',
options: {
topBar: {
title: {
text: 'Screen Name 1',
},
drawBehind: false,
leftButtons: [
{
id: 'backButton',
enabled: true,
showAsAction: 'ifRoom',
component: {
name: 'projectName.Home',
passProps: {
color: 'white',
// pass event here
}
},
icon: sources[0],
color: 'white',
},
],
}
}
},
}]
}
}
});
});
}
它看起来像这样:
------------------------------------
<- Screen Name 1
------------------------------------
如何访问新屏幕中的后退按钮?
有人可以帮我转到上一个屏幕吗?
谢谢
答案 0 :(得分:0)
使用navigation.showmodal修复此问题