props.js
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import defprops from '../../libs/config/props';
export default {
props: {
// 是否展示picker弹窗
show: {
type: Boolean,
default: defprops.picker.show
},
// 是否展示顶部的操作栏
showToolbar: {
type: Boolean,
default: defprops.picker.showToolbar
},
// 顶部标题
title: {
type: String,
default: defprops.picker.title
},
// 对象数组,设置每一列的数据
columns: {
type: Array,
default: defprops.picker.columns
},
// 是否显示加载中状态
loading: {
type: Boolean,
default: defprops.picker.loading
},
// 各列中,单个选项的高度
itemHeight: {
type: [String, Number],
default: defprops.picker.itemHeight
},
// 取消按钮的文字
cancelText: {
type: String,
default: defprops.picker.cancelText
},
// 确认按钮的文字
confirmText: {
type: String,
default: defprops.picker.confirmText
},
// 取消按钮的颜色
cancelColor: {
type: String,
default: defprops.picker.cancelColor
},
// 确认按钮的颜色
confirmColor: {
type: String,
default: defprops.picker.confirmColor
},
// 每列中可见选项的数量
visibleItemCount: {
type: [String, Number],
default: defprops.picker.visibleItemCount
},
// 选项对象中,需要展示的属性键名
keyName: {
type: String,
default: defprops.picker.keyName
},
// 是否允许点击遮罩关闭选择器
closeOnClickOverlay: {
type: Boolean,
default: defprops.picker.closeOnClickOverlay
},
// 各列的默认索引
defaultIndex: {
type: Array,
default: defprops.picker.defaultIndex
},
// 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件,只在微信2.21.1及以上有效
immediateChange: {
type: Boolean,
default: defprops.picker.immediateChange
}
}
}