Skip to content

Commit 7c5a071

Browse files
committed
docs: picker docs add API
1 parent 8c7a00e commit 7c5a071

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

docs/feedbackComponent/picker.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,61 @@ export default {
2020
``` html
2121
<mp-picker ref="mpvuePicker" :mode="mode" :deepLength=deepLength :pickerValueDefault="pickerValueDefault" @onChange="onChange" @onConfirm="onConfirm" @onCancel="onCancel" :pickerValueArray="pickerValueArray"></mp-picker>
2222
```
23+
24+
### API
25+
26+
27+
### mode
28+
* 说明:picker 组件类型
29+
* 类型:String
30+
* 可选值:
31+
* selector(单列)
32+
* timeSelector(时间选择)
33+
* multiSelector(多列)
34+
* multiLinkageSelector(级联)
35+
* 是否必填: 否
36+
* 默认值:selector
37+
38+
### pickerValueArray
39+
* 说明:picker 渲染数据
40+
* 类型:Array
41+
* 可选值:-
42+
* 是否必填: 是(当 mode 值为 timeSelector 不用填)
43+
* 默认值:-
44+
45+
### pickerValueDefault
46+
* 说明:picker 默认选中值
47+
* 类型:Array
48+
* 可选值:-
49+
* 是否必填: 否 (当同一个组件使用多种 mode 来回切换使用时 pickerValueDefault 必填)
50+
* 默认值:[]
51+
52+
### deepLength
53+
* 说明:几级联动
54+
* 类型:Number
55+
* 可选值:
56+
* 2
57+
* 3
58+
* 是否必填: 否
59+
* 默认值:2
60+
61+
### onChange
62+
* 说明:picker 组件滚动时回调,返回选中的 label, value 和数组索引 index 的值
63+
* 类型:EventHandle
64+
* 可选值:-
65+
* 是否必填: 否
66+
* 默认值:-
67+
68+
### onConfirm
69+
* 说明:picker 组件点击确定时回调,返回选中的 label, value 和数组索引 index 的值
70+
* 类型:EventHandle
71+
* 可选值:-
72+
* 是否必填: 否
73+
* 默认值:-
74+
75+
### onCancel
76+
* 说明:picker 组件点击取消时回调,返回选中的 label, value 和数组索引 index 的值
77+
* 类型:EventHandle
78+
* 可选值:-
79+
* 是否必填: 否
80+
* 默认值:-

0 commit comments

Comments
 (0)