zhangmeng
2024-04-19 e3ba120cb766a17e098e58d11c39ffc600a3070c
commit | author | age
e3ba12 1 export default {
Z 2     props: {
3         // 步进器标识符,在change回调返回
4         name: {
5             type: [String, Number],
6             default: uni.$u.props.numberBox.name
7         },
8         // 用于双向绑定的值,初始化时设置设为默认min值(最小值)
9         value: {
10             type: [String, Number],
11             default: uni.$u.props.numberBox.value
12         },
13         // 最小值
14         min: {
15             type: [String, Number],
16             default: uni.$u.props.numberBox.min
17         },
18         // 最大值
19         max: {
20             type: [String, Number],
21             default: uni.$u.props.numberBox.max
22         },
23         // 加减的步长,可为小数
24         step: {
25             type: [String, Number],
26             default: uni.$u.props.numberBox.step
27         },
28         // 是否只允许输入整数
29         integer: {
30             type: Boolean,
31             default: uni.$u.props.numberBox.integer
32         },
33         // 是否禁用,包括输入框,加减按钮
34         disabled: {
35             type: Boolean,
36             default: uni.$u.props.numberBox.disabled
37         },
38         // 是否禁用输入框
39         disabledInput: {
40             type: Boolean,
41             default: uni.$u.props.numberBox.disabledInput
42         },
43         // 是否开启异步变更,开启后需要手动控制输入值
44         asyncChange: {
45             type: Boolean,
46             default: uni.$u.props.numberBox.asyncChange
47         },
48         // 输入框宽度,单位为px
49         inputWidth: {
50             type: [String, Number],
51             default: uni.$u.props.numberBox.inputWidth
52         },
53         // 是否显示减少按钮
54         showMinus: {
55             type: Boolean,
56             default: uni.$u.props.numberBox.showMinus
57         },
58         // 是否显示增加按钮
59         showPlus: {
60             type: Boolean,
61             default: uni.$u.props.numberBox.showPlus
62         },
63         // 显示的小数位数
64         decimalLength: {
65             type: [String, Number, null],
66             default: uni.$u.props.numberBox.decimalLength
67         },
68         // 是否开启长按加减手势
69         longPress: {
70             type: Boolean,
71             default: uni.$u.props.numberBox.longPress
72         },
73         // 输入框文字和加减按钮图标的颜色
74         color: {
75             type: String,
76             default: uni.$u.props.numberBox.color
77         },
78         // 按钮大小,宽高等于此值,单位px,输入框高度和此值保持一致
79         buttonSize: {
80             type: [String, Number],
81             default: uni.$u.props.numberBox.buttonSize
82         },
83         // 输入框和按钮的背景颜色
84         bgColor: {
85             type: String,
86             default: uni.$u.props.numberBox.bgColor
87         },
88         // 指定光标于键盘的距离,避免键盘遮挡输入框,单位px
89         cursorSpacing: {
90             type: [String, Number],
91             default: uni.$u.props.numberBox.cursorSpacing
92         },
93         // 是否禁用增加按钮
94         disablePlus: {
95             type: Boolean,
96             default: uni.$u.props.numberBox.disablePlus
97         },
98         // 是否禁用减少按钮
99         disableMinus: {
100             type: Boolean,
101             default: uni.$u.props.numberBox.disableMinus
102         },
103         // 加减按钮图标的样式
104         iconStyle: {
105             type: [Object, String],
106             default: uni.$u.props.numberBox.iconStyle
107         }
108     }
109 }