RN 组件 Modal 模态框遮罩层

RN 组件 Modal 模态框遮罩层

#用来覆盖包含react-native根视图的根视图,实现遮罩层效果

属性

// 动画类型 slide从底部划入 /fade 从视野淡出
animationType: none | fade | slide;

// 决定背景是否透明,若为true,则出现透明遮罩层,若为false,则背景为灰色,无透明效果
transparent : true | false;

// 决定此模态框是否可见
visible: true | false;

// 模态框关闭/销毁时调用的函数 Platform.OS === 'android' ? PropTypes.func.isRequired : PropTypes.func;在安卓平台必须调用
onRequestClose = {() => {}}

// 模态框显示的时候调用的函数
onShow = {() => {}}

猜你喜欢

转载自blog.csdn.net/snow51/article/details/80506957