各位大佬,这个close不能从外部关闭modal.alert吗?
const modalAlert = Modal.alert('', <Text style={styles.modalText}>{this.props.t('mycart:nowgo')}</Text>, [
{text: this.props.t('muaccount:cancel'), style: {color: '#737373',fontSize:16}},
{text: this.props.t('mycart:cart'), onPress: () => this.props.navigation.navigate('Cart'), style: {color: '#ff3d11',fontSize:16}},
]);
setTimeout(() => {
console.log(modalAlert)
modalAlert.close()
}, 2000);
https://rn.mobile.ant.design/...
官方文档也是这样写的,有大佬遇到过这样的问题吗
应该是有bug,还没解决。
https://github.com/ant-design...