mochixuan / react-native-smart-tip

🔥🔥🔥Toast , SnackBar , Modal , Show Toast above Modal
248 stars 37 forks source link

WToast会被Modal挡住 #7

Closed huangsong closed 5 years ago

huangsong commented 5 years ago

当使用Modal组件的时候,WToast会被挡在下面。

huangsong commented 5 years ago

`<Modal animationType={'fade'} transparent={true} visible={withdrawSuccessTipsVisible} style={{flex:1}}> <KeyboardAvoidingView behavior={'height'} style={{flex: 1}}>

{ this.setState({ withdrawSuccessTipsVisible:false }) }} style={GlobalStyles.modalCloseTouch}> { Clipboard.setString(Config.serviceWX); WToast.show({ position: WToast.position.CENTER, data: '成功复制微信号到剪切板,请到微信中搜索添加!' }) }} > {Config.serviceWX}
                        </View>
                    </View>
                        </KeyboardAvoidingView>
                    </Modal>`
mochixuan commented 5 years ago

这样讲吧:在安卓里Model层级比Activity高,Activity就是存放RN的地方,意思是Model最上层,所以RN组件和代码都会被遮住,你可以看看网上其他人的这个是避免不了,你可以使用WModel试试。要记得自己取消