React-native-modal库是否无法显示多个模态的屏幕?

时间:2019-04-25 05:52:32

标签: javascript node.js react-native ecmascript-6

我在一个屏幕中有多个模态,例如在“启动画面”中,打开一个着陆页模块,在着陆页模态中打开一个SignUp1模态,在注册模态中打开signUp2模态。但是之后,当尝试使用react-native-router-flux打开新屏幕HomeScreen时,它将再次进入LandingPageModal并挂起应用程序。我想通过模式顶部打开主屏幕。对于模态,我使用react-native-modal库。

//Landing Page Modal
<Modal isVisible={true}>
<View>
<Text onPress = {() => this.modal.showModal()}>Landing 
Modal</Text>
<View>
<SignUp1Modal ref = {ref => this.modal = ref}
<Modal>


//Sign uP1 Modal
<Modal isVisible={true}>
<View>
<Text onPress = {() => this.modal.showModal()}>SignUp Modal 
1</Text>
<View>
<SignUp2Modal ref = {ref => this.modal = ref}
<Modal>


//Signup Modal 2
<Modal isVisible={true}>
<View>
<Text onPress = {() => Actions.replace('home')}>Sign uP 2 
Modal</Text>
<View>
<Modal>



//Home Screen
<View>
<Text>Home Screen</Text>
</View>

0 个答案:

没有答案