File tree Expand file tree Collapse file tree 4 files changed +12
-2
lines changed
Expand file tree Collapse file tree 4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ npm install react-native-picker-xg --save
2020 * pickerNameStyle: CSS-layout, the style of the pickerName
2121 * cancelBtnStyle: CSS-layout, the style of the cancel button
2222 * confirmBtnStyle: CSS-layout, the confirm button's style
23+ * iconStyle: CSS-layout, the right downdrop button's style
2324 * inputStyle: CSS-layout, the textInput's style
2425 * navStyle: CSS-layout, the style of the nav of the picker
2526 * textStyle: CSS-layout, the style of the inputText's inner text
@@ -38,6 +39,7 @@ npm install react-native-picker-xg --save
3839 * inputStyle: CSS-layout, the textInput's style
3940 * navStyle: CSS-layout, the style of the nav of the picker
4041 * textStyle: CSS-layout, the style of the inputText's inner text
42+ * iconStyle: CSS-layout, the right downdrop button's style
4143 * pickerName: string, the text of the picker's name
4244 * inputValue: string, the initial text of the textInput
4345 * selectIndex: [ number] ,initial selected item
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ class CPickerroll extends Component {
5555 navStyle : View . propTypes . style ,
5656 //输入框内部字体样式
5757 textStyle : Text . propTypes . style ,
58+ //右边下拉按钮的样式
59+ iconStyle : View . propTypes . style ,
5860 //picker的名称
5961 pickerName : PropTypes . string ,
6062 //输入框内部文字初始值
@@ -342,7 +344,7 @@ class CPickerroll extends Component {
342344 placeholder = { this . state . inputValue }
343345 value = { this . state . inputValue }
344346 /> < TouchableOpacity className = "arrowDown" style = { styles . iconOuter } onPress = { ( ) => { this . _setEventBegin ( ) } } >
345- < Image source = { require ( './img/arrow.png' ) } />
347+ < Image source = { require ( './img/arrow.png' ) } style = { [ styles . icon , this . props . iconStyle ] } />
346348 </ TouchableOpacity >
347349 </ View >
348350 </ View >
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ class TMPicker extends Component {
5555 navStyle : View . propTypes . style ,
5656 //输入框内部字体样式
5757 textStyle : Text . propTypes . style ,
58+ //右边下拉按钮的样式
59+ iconStyle : View . propTypes . style ,
5860 //picker的名称
5961 pickerName : PropTypes . string ,
6062 //输入框内部文字初始值
@@ -281,7 +283,7 @@ class TMPicker extends Component {
281283 placeholder = { this . state . inputValue }
282284 value = { this . state . inputValue }
283285 /> < TouchableOpacity className = "arrowDown" style = { styles . iconOuter } onPress = { ( ) => { this . _setEventBegin ( ) } } >
284- < Image source = { require ( './img/arrow.png' ) } />
286+ < Image source = { require ( './img/arrow.png' ) } style = { [ styles . icon , this . props . iconStyle ] } />
285287 </ TouchableOpacity >
286288 </ View >
287289 </ View >
Original file line number Diff line number Diff line change @@ -75,6 +75,10 @@ let styles = StyleSheet.create({
7575 container2Icon : {
7676 flex :1 ,
7777 marginTop :- 10 ,
78+ } ,
79+ icon : {
80+ width :30 ,
81+ height :30
7882 }
7983} ) ;
8084
You can’t perform that action at this time.
0 commit comments