Skip to content

Commit a85d6c9

Browse files
committed
chore(Picker): Update Readme
1 parent 7496cac commit a85d6c9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

example/examples/src/routes/Picker/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ export default class BadgeView extends React.Component<BadgeViewProps> {
3232
marginTop: 20,
3333
}}>
3434
<View style={{width: '50%'}}>
35-
<Picker date={arr as any} value={17} />
35+
<Picker data={arr as any} value={17} />
3636
</View>
3737
<View style={{width: '50%'}}>
3838
<Picker
3939
onChange={val => {
4040
console.log('val: ', val);
4141
}}
42-
date={arr as any}
42+
data={arr as any}
4343
value={this.state.value}
4444
/>
4545
</View>

packages/core/src/Picker/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function Demo() {
1717
return (
1818
<View style={{ flex: 1 }}>
1919
<Picker
20-
date={[
20+
data={[
2121
{label: '1'},
2222
{label: '2'},
2323
{label: '3'},
@@ -40,7 +40,7 @@ function Demo() {
4040
return (
4141
<View style={{ flex: 1 }}>
4242
<Picker
43-
date={[
43+
data={[
4444
{label: '1'},
4545
{label: '2'},
4646
{label: '3'},
@@ -61,9 +61,9 @@ function Demo() {
6161
```ts
6262
import { StyleProp, TextStyle, ViewStyle } from 'react-native';
6363

64-
export interface PickerDate {
64+
export interface PickerData {
6565
label?: string,
66-
render?: (key: string, record: PickerDate, index: number)=>React.ReactNode,
66+
render?: (key: string, record: PickerData, index: number)=>React.ReactNode,
6767
[key: string]: any
6868
}
6969

@@ -73,7 +73,7 @@ export interface PickerProps {
7373
/** 指定需要显示的 key, 默认使用 data 的 label 属性 */
7474
key?: string,
7575
/** 需要渲染的数据 */
76-
date?: Array<PickerDate>,
76+
data?: Array<PickerData>,
7777
/** item 容器样式 */
7878
containerStyle?: {
7979
/** 激活的容器样式 */

0 commit comments

Comments
 (0)