alert('报名时间已过!');
Alert.alert(
"标题标题",
"内容内容内容内容内容内容内容内容内容内容"
);
Alert.alert(
"标题标题",
"内容内容内容内容内容内容内容内容内容内容"
,
[
{text: "取消"/*, onPress: () => console.log('Cancel Pressed!')*/},
{text:"确定", onPress: () => console.log('OK!')}
]);
点击确认按钮
控制台打印
<Prompt
title={message}
cancelText="取消"
submitText="好"
visible={ this.state.promptVisible }
onCancel={ () => this.setState({
promptVisible: false,
message: "You cancelled"
}) }
onSubmit={ (value) => {
this.setState({
promptVisible: false,
message: `You said "${value}"`
});
this.saveResponse(value);
}
}/>
AlertIOS.alert('网络已断开,请设置网络')
AlertIOS.alert('提示', '当前处于移动网络状态,是否继续播放?', [
{
text: '取消播放',
onPress: function () {
}
},
{
text: '继续播放',
onPress: function () {
}
}
])