Commit ddec3ff0 authored by xwenliang's avatar xwenliang

v0.2.8

parent 473d96a6
......@@ -8,17 +8,23 @@ Needs react-native >= 0.14.2
![ui](./doc/ui.gif)
![ui2](./doc/ui2.jpg)
###Documentation
####Props
- <b>pickerBtnText</b> string, tool bar's btn text
- <b>pickerBtnText</b> string, tool bar's confirm btn text
- <b>pickerCancelBtnText</b> string, tool bar's cancel ben text
- <b>pickerBtnStyle</b> textStylePropType, tool bar's btn style
- <b>pickerToolBarStyle</b> viewStylePropType, tool bar's style
- <b>pickerHeight</b> number
- <b>showDuration</b> number
- <b>pickerHeight</b> number, height of picker
- <b>showDuration</b> number, animation of picker
- <b>pickerTitle</b> string, title of picker
- <b>pickerTitleStyle</b> textStylePropType, style of title
- <b>pickerData</b> array
- <b>selectedValue</b> any
- <b>onPickerDone</b> function
- <b>onPickerCancel</b> function
####Methods
- <b>toggle</b> show or hide picker, default to be hiden
......@@ -37,7 +43,6 @@ Needs react-native >= 0.14.2
import Picker from 'react-native-picker'
<Picker
ref={picker => {this.picker = picker;}}
pickerHeight={300}
showDuration={300}
pickerData={}//picker`s value List
......
doc/ui2.jpg

32.9 KB

......@@ -102,7 +102,7 @@ export default class PickerAny extends React.Component {
secondPickedData = props.selectedValue[1];
cascadeData = this._getCascadeData(pickerData, selectedValue, firstPickedData, secondPickedData, true);
}
//保存了已经选择到的数据
//save picked data
this.pickedValue = selectedValue;
this.pickerStyle = pickerStyle;
return {
......@@ -482,7 +482,8 @@ let styles = StyleSheet.create({
flexDirection: 'row',
borderTopWidth: 1,
borderBottomWidth: 1,
borderColor: '#c3c3c3'
borderColor: '#c3c3c3',
alignItems: 'center'
},
pickerBtnView: {
flex: 1,
......@@ -503,7 +504,7 @@ let styles = StyleSheet.create({
marginLeft: 20
},
pickerTitle: {
flex: 5,
flex: 4,
color: 'black',
textAlign: 'center'
},
......
{
"name": "react-native-picker",
"version": "0.2.7",
"version": "0.2.8",
"description": "react-native-picker",
"main": "index.js",
"scripts": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment