react-native自定义对话框弹出框组件dialogs
介绍:http://www.jianshu.com/p/076ca28f7012
这是一款结合了alert弹出框与confirm弹出框综合的一款组件,可以定义参数改变弹出框的样式以及点击事件等
展示:
![](http://upload-images.jianshu.io/upload_images/4999533-b7b9150f57ea9ca6.gif?imageMogr2/auto-orient/strip)
使用代码:
![](http://upload-images.jianshu.io/upload_images/4999533-042d1954700602e5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](http://upload-images.jianshu.io/upload_images/4999533-d4c101abe0a6571c.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](http://upload-images.jianshu.io/upload_images/4999533-a1b255dc0fc66e8a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![](http://upload-images.jianshu.io/upload_images/4999533-1e09a6035f6a24af.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
自定义参数:
/**
* animationType:动画类型 使用Modal组件 ’none,fade,slide‘ ---string
* title:头部标题文字 ---string
* thide:true|false 是否隐藏头部 ---boolean
* headStyle:头部样式 ---object
* messText:中间提示文字 ---string
* clickScreen:点击屏幕是否隐藏弹出框 ---boolean
* innersWidth:弹出框的宽度 ---number
* innersHeight:弹出框的高度 ---number
* buttons:按钮数组 ---array
* buttons:[
* {
* txt:'按钮文字', ---string
* btnStyle:{backgroundColor:'transparent'}, 按钮的样式对象---object
* txtStyle:{color:'#ff6600'}, 按钮的文字样式 ---object
* onpress:this.cancels.bind(this) 按钮的点击事件 ---function
* }
* ...
* ]
*/
事件:
show(options):显示
hide(): 隐藏
相关文章
- react-native 封装 VedioPlayer 组件
- react 自定义 TabBar 组件
- React 组件生命周期
- React 组件 API
- react学习笔记2--组件
- 快应用tabs和video组件滑动事件优先级问题
- React 多组件传值props和this
- react开发组件并发包到npm
- react组件懒加载
- React高阶组件(HOC),让组件复用与扩展变得简单,省时、省力又省心,何不用起来?
- React学习笔记 -- 组件通信之路由传参(react-router-dom)
- smb.conf - Samba组件的配置文件
- SwiftUI4 iOS16 新增组件之 如何在 SwiftUI 中共享内容
- SwiftUI iOS 精品工具条组件之 13 多行文本支持换行滚动工具条(教程含源码)
- SwiftUI iOS 精品工具条组件之 05 浮雕效果滚动工具条(教程含源码)
- SwiftUI 精品组件之仿经典滑动解锁效果 (教程含源码)
- macOS SwiftUI 复杂组件之可编辑List表单带check box (教程含源码)
- React教程之 React 中 Render Props 和高阶组件HOC的详细介绍
- react函数式组件(非路由组件)实现路由跳转
- React之组件之间的通讯
- React之类组件与函数组件
- vue3+ts+vite之路由组件的搭建
- React函数式组件的性能优化
- 浅析vue-class-component介绍:用类的方式编写组件
- vscode插件快速创建react组件快捷键
- 光伏组件为何出现白色线条?
- 如何用 120 行代码,实现交互完整的拖拽上传组件?