0.1.18 • Published 4 years ago
react-native-aplus v0.1.18
react-native-plus
扩展日常开发所需要的API,列入弹框,loading,ActionSheet等等。
安装
npm install react-native-aplus --save
自动link
$ react-native link react-native-aplus
用法
import { Platform,Button, StyleSheet, Text, View } from 'react-native';
import Plus,{ Portal,Component } from 'react-native-aplus';
import React from 'react';
// 在你的根组件中用 Portal组件, 如果是继承了 react-native-aplus 的component 则可以直接使用this.$$Plus.方法 来代替Plus.方法
export class App extends Component {
render(){
return (
<View>
<Portal/>
</View>)
}
}
// Toast组件
Plus.showToast('hello toast') // or
Plus.showToast({ title:"hello",duration: Plus.Toast.DURATION.LONG,position: Plus.Toast.POSITION.CENTER })
// Loading组件
Plus.showLoading('数据加载中...'); // or
Plus.Loading.setIndicatorProps({ // 设置loading的颜色
color:'#f50',
size:'large'
});
Plus.showLoading({
title:'数据加载中...',
theme: Plus.Loading.THEME.THEME3
}); // 使用主题三
// actionsheet
Plus.showActionSheet({
title:'请选择',
message:'请选择一种水果',
itemList: ['香蕉','梨子','关闭'],
success(tapIndex) { // 点击之后的回调函数,数组的下标
console.log(tapIndex)
}
});
// 弹框
Plus.showModal({
title:"消息",
message:'hello world',
showCancel: true,
showConfirm: true,
textCancel: "关闭",
textConfirm: "确认",
onConfirm(){
Plus.hideModal()
}
});
TODO
- loading (完成)
- toast (完成)
- 对话框 (完成)
- ActionSheet (完成)
- FlatList (完成)
- ShareCard面板 (完成)
- 图片选择
- 图片预览
- 多列选择
- 三方登录
- 三方支付...
0.1.18
4 years ago
0.1.17
4 years ago
0.1.16
4 years ago
0.1.15
4 years ago
0.1.14
4 years ago
0.1.13
4 years ago
0.1.12
4 years ago
0.1.11
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.4
4 years ago
0.1.5
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago
0.0.10
4 years ago
0.0.9
4 years ago
0.0.8
4 years ago
0.0.5
4 years ago
0.0.6
4 years ago
0.0.4
4 years ago
0.0.3
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago