Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-picker
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ym
react-native-picker
Commits
ddec3ff0
Commit
ddec3ff0
authored
Dec 30, 2015
by
xwenliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.2.8
parent
473d96a6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
8 deletions
+14
-8
README.md
README.md
+9
-4
doc/ui2.jpg
doc/ui2.jpg
+0
-0
index.js
index.js
+4
-3
package.json
package.json
+1
-1
No files found.
README.md
View file @
ddec3ff0
...
...
@@ -8,17 +8,23 @@ Needs react-native >= 0.14.2


###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
0 → 100644
View file @
ddec3ff0
32.9 KB
index.js
View file @
ddec3ff0
...
...
@@ -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
'
},
...
...
package.json
View file @
ddec3ff0
{
"name"
:
"react-native-picker"
,
"version"
:
"0.2.
7
"
,
"version"
:
"0.2.
8
"
,
"description"
:
"react-native-picker"
,
"main"
:
"index.js"
,
"scripts"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment