File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
example/examples/src/routes/Picker Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,14 @@ export default class BadgeView extends React.Component<BadgeViewProps> {
32
32
marginTop : 20 ,
33
33
} } >
34
34
< View style = { { width : '50%' } } >
35
- < Picker date = { arr as any } value = { 17 } />
35
+ < Picker data = { arr as any } value = { 17 } />
36
36
</ View >
37
37
< View style = { { width : '50%' } } >
38
38
< Picker
39
39
onChange = { val => {
40
40
console . log ( 'val: ' , val ) ;
41
41
} }
42
- date = { arr as any }
42
+ data = { arr as any }
43
43
value = { this . state . value }
44
44
/>
45
45
</ View >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function Demo() {
17
17
return (
18
18
< View style= {{ flex: 1 }}>
19
19
< Picker
20
- date = {[
20
+ data = {[
21
21
{label: ' 1' },
22
22
{label: ' 2' },
23
23
{label: ' 3' },
@@ -40,7 +40,7 @@ function Demo() {
40
40
return (
41
41
< View style= {{ flex: 1 }}>
42
42
< Picker
43
- date = {[
43
+ data = {[
44
44
{label: ' 1' },
45
45
{label: ' 2' },
46
46
{label: ' 3' },
@@ -61,9 +61,9 @@ function Demo() {
61
61
``` ts
62
62
import { StyleProp , TextStyle , ViewStyle } from ' react-native' ;
63
63
64
- export interface PickerDate {
64
+ export interface PickerData {
65
65
label? : string ,
66
- render? : (key : string , record : PickerDate , index : number )=> React .ReactNode ,
66
+ render? : (key : string , record : PickerData , index : number )=> React .ReactNode ,
67
67
[key : string ]: any
68
68
}
69
69
@@ -73,7 +73,7 @@ export interface PickerProps {
73
73
/** 指定需要显示的 key, 默认使用 data 的 label 属性 */
74
74
key? : string ,
75
75
/** 需要渲染的数据 */
76
- date ? : Array <PickerDate >,
76
+ data ? : Array <PickerData >,
77
77
/** item 容器样式 */
78
78
containerStyle? : {
79
79
/** 激活的容器样式 */
You can’t perform that action at this time.
0 commit comments