React-Native从入门到放弃

Modal

2018-08-29  本文已影响12人  一朝瑾秋色

基本用法 eg:

animationType="slide"

transparent={false}

visible={this.state.modalVisible}

onRequestClose={()=> {

            alert('Modal has been closed.');

          }}>


animationType

enum

slide :slides in from the bottom    从底下弹出

fade :fades into view    逐渐消失

none :appears without an animation    没有动画

transparent

Boolean 背景是否透明

visible

Boolean 是否显示Modal 核心属性

onRequestClose

function 安卓的物理返回键事件

onShow

function Modal显示的时候被调用

上一篇 下一篇

猜你喜欢

热点阅读