它不会生成原生 UI 组件,而是基于 React,React Native
是一个用于构建基于 Web 的交互界面的 JavaScript 库,因此会有更丰富的 UI 体验效果,同时也能够很好地调用底层框架的...使用范例
// 同时兼容 iOS 和 Android
Alert.alert(
'弹出框标题',
'弹出框描述',
[
{text: '自定义按钮', onPress: () =>...console.log('点击了自定义按钮')},
{
text: '取消',
onPress: () => console.log('点击了取消按钮'),...style: 'cancel',
},
{text: '确认', onPress: () => console.log('点击了确认按钮')},
],
{cancelable:...,
[
{text: '确认', onPress: () => showTip()},
{text: '取消',