@@ -61,45 +61,16 @@ function Demo() {
6161export default Demo
6262```
6363
64-
65-
6664### Props
6765
68- ``` ts
69- import { StyleProp , TextStyle , ViewStyle } from ' react-native' ;
70-
71- export interface PickerData {
72- label? : string ,
73- render? : (key : string , record : PickerData , index : number )=> React .ReactNode ,
74- [key : string ]: any
75- }
66+ 属性 | 说明 | 类型 | 默认值
67+ ----|-----|------|------
68+ | lines | 显示行数 | number | 3 |
69+ | rowKey | 在开始位置设置图标 | string | - |
70+ | data | 需要渲染的数据 | Array | - |
71+ | containerStyle | item 容器样式 | obj | - |
72+ | textStyle | 容器的文本样式 | TextStyle | - |
73+ | value | 选中当前项的下标 | number | - |
74+ | onChange | value 改变时触发 | fn | - |
75+ | readonly | 是否只读 | fn | - |
7676
77- export interface PickerProps {
78- /** 显示几行, 默认 3 */
79- lines? : number ,
80- /** 指定需要显示的 key, 默认使用 data 的 label 属性 */
81- rowKey? : string ,
82- /** 需要渲染的数据 */
83- data? : Array <PickerData >,
84- /** item 容器样式 */
85- containerStyle? : {
86- /** 激活的容器样式 */
87- actived? : StyleProp <ViewStyle >,
88- /** 未激活的容器样式 */
89- unactived? : StyleProp <ViewStyle >,
90- },
91- /** 容器的文本样式 */
92- textStyle? : {
93- /** 激活的文本样式 */
94- actived? : StyleProp <TextStyle >,
95- /** 未激活的文本样式 */
96- unactived? : StyleProp <TextStyle >,
97- },
98- /** 选中当前项的下标 */
99- value? : number ,
100- /** value 改变时触发 */
101- onChange? : (value : number )=> unknown ,
102- /** 是否只读 不能点击不能滑动但可以通过value控制 */
103- readonly? : boolean
104- }
105- ```
0 commit comments