uview-plus 3.1.35 → 3.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +4 -0
- package/components/u-action-sheet/u-action-sheet.vue +1 -0
- package/components/u-album/u-album.vue +1 -0
- package/components/u-alert/u-alert.vue +1 -0
- package/components/u-avatar/u-avatar.vue +1 -0
- package/components/u-avatar-group/u-avatar-group.vue +1 -0
- package/components/u-back-top/u-back-top.vue +2 -1
- package/components/u-badge/u-badge.vue +1 -1
- package/components/u-calendar/u-calendar.vue +1 -0
- package/components/u-car-keyboard/u-car-keyboard.vue +312 -311
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/u-cell-group.vue +1 -1
- package/components/u-checkbox/u-checkbox.vue +2 -1
- package/components/u-code/u-code.vue +1 -0
- package/components/u-code-input/props.js +13 -5
- package/components/u-code-input/u-code-input.vue +8 -2
- package/components/u-col/u-col.vue +1 -0
- package/components/u-collapse/u-collapse.vue +1 -0
- package/components/u-column-notice/u-column-notice.vue +1 -0
- package/components/u-count-down/u-count-down.vue +164 -163
- package/components/u-count-to/u-count-to.vue +1 -0
- package/components/u-divider/u-divider.vue +1 -0
- package/components/u-dropdown/u-dropdown.vue +127 -129
- package/components/u-form-item/u-form-item.vue +1 -0
- package/components/u-image/u-image.vue +1 -1
- package/components/u-index-anchor/u-index-anchor.vue +1 -1
- package/components/u-index-item/u-index-item.vue +1 -1
- package/components/u-index-list/u-index-list.vue +1 -1
- package/components/u-input/u-input.vue +3 -3
- package/components/u-keyboard/u-keyboard.vue +1 -0
- package/components/u-link/u-link.vue +1 -0
- package/components/u-list/u-list.vue +1 -0
- package/components/u-loadmore/u-loadmore.vue +1 -0
- package/components/u-modal/u-modal.vue +230 -229
- package/components/u-navbar/u-navbar.vue +1 -1
- package/components/u-no-network/u-no-network.vue +1 -0
- package/components/u-notice-bar/u-notice-bar.vue +1 -0
- package/components/u-number-box/u-number-box.vue +1 -1
- package/components/u-number-keyboard/u-number-keyboard.vue +1 -1
- package/components/u-overlay/u-overlay.vue +1 -0
- package/components/u-parse/node/node.vue +2 -2
- package/components/u-parse/parser.js +1333 -1333
- package/components/u-parse/u-parse.vue +5 -5
- package/components/u-popup/u-popup.vue +307 -306
- package/components/u-radio/u-radio.vue +1 -1
- package/components/u-read-more/u-read-more.vue +1 -0
- package/components/u-row/u-row.vue +1 -0
- package/components/u-row-notice/u-row-notice.vue +1 -0
- package/components/u-scroll-list/u-scroll-list.vue +1 -0
- package/components/u-search/u-search.vue +6 -2
- package/components/u-slider/props.js +13 -5
- package/components/u-slider/u-slider.vue +66 -55
- package/components/u-status-bar/u-status-bar.vue +1 -1
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/u-steps-item.vue +1 -1
- package/components/u-subsection/u-subsection.vue +1 -0
- package/components/u-swiper/u-swiper.vue +10 -9
- package/components/u-tabbar-item/u-tabbar-item.vue +1 -0
- package/components/u-tag/u-tag.vue +362 -361
- package/components/u-toolbar/u-toolbar.vue +1 -0
- package/components/u-tooltip/u-tooltip.vue +1 -0
- package/components/u-upload/u-upload.vue +1 -1
- package/package.json +1 -1
|
@@ -1,313 +1,314 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view
|
|
3
|
-
class="u-keyboard"
|
|
4
|
-
@touchmove.stop.prevent="noop"
|
|
5
|
-
>
|
|
6
|
-
<view
|
|
7
|
-
v-for="(group, i) in abc ? engKeyBoardList : areaList"
|
|
8
|
-
:key="i"
|
|
9
|
-
class="u-keyboard__button"
|
|
10
|
-
:index="i"
|
|
11
|
-
:class="[i + 1 === 4 && 'u-keyboard__button--center']"
|
|
12
|
-
>
|
|
13
|
-
<view
|
|
14
|
-
v-if="i === 3"
|
|
15
|
-
class="u-keyboard__button__inner-wrapper"
|
|
16
|
-
>
|
|
17
|
-
<view
|
|
18
|
-
class="u-keyboard__button__inner-wrapper__left"
|
|
19
|
-
hover-class="u-hover-class"
|
|
20
|
-
:hover-stay-time="200"
|
|
21
|
-
@tap="changeCarInputMode"
|
|
22
|
-
>
|
|
23
|
-
<text
|
|
24
|
-
class="u-keyboard__button__inner-wrapper__left__lang"
|
|
25
|
-
:class="[!abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
|
|
26
|
-
>中</text>
|
|
27
|
-
<text class="u-keyboard__button__inner-wrapper__left__line">/</text>
|
|
28
|
-
<text
|
|
29
|
-
class="u-keyboard__button__inner-wrapper__left__lang"
|
|
30
|
-
:class="[abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
|
|
31
|
-
>英</text>
|
|
32
|
-
</view>
|
|
33
|
-
</view>
|
|
34
|
-
<view
|
|
35
|
-
class="u-keyboard__button__inner-wrapper"
|
|
36
|
-
v-for="(item, j) in group"
|
|
37
|
-
:key="j"
|
|
38
|
-
>
|
|
39
|
-
<view
|
|
40
|
-
class="u-keyboard__button__inner-wrapper__inner"
|
|
41
|
-
:hover-stay-time="200"
|
|
42
|
-
@tap="carInputClick(i, j)"
|
|
43
|
-
hover-class="u-hover-class"
|
|
44
|
-
>
|
|
45
|
-
<text class="u-keyboard__button__inner-wrapper__inner__text">{{ item }}</text>
|
|
46
|
-
</view>
|
|
47
|
-
</view>
|
|
48
|
-
<view
|
|
49
|
-
v-if="i === 3"
|
|
50
|
-
@touchstart="backspaceClick"
|
|
51
|
-
@touchend="clearTimer"
|
|
52
|
-
class="u-keyboard__button__inner-wrapper"
|
|
53
|
-
>
|
|
54
|
-
<view
|
|
55
|
-
class="u-keyboard__button__inner-wrapper__right"
|
|
56
|
-
hover-class="u-hover-class"
|
|
57
|
-
:hover-stay-time="200"
|
|
58
|
-
>
|
|
59
|
-
<u-icon
|
|
60
|
-
size="28"
|
|
61
|
-
name="backspace"
|
|
62
|
-
color="#303133"
|
|
63
|
-
></u-icon>
|
|
64
|
-
</view>
|
|
65
|
-
</view>
|
|
66
|
-
</view>
|
|
67
|
-
</view>
|
|
68
|
-
</template>
|
|
69
|
-
|
|
70
|
-
<script>
|
|
1
|
+
<template>
|
|
2
|
+
<view
|
|
3
|
+
class="u-keyboard"
|
|
4
|
+
@touchmove.stop.prevent="noop"
|
|
5
|
+
>
|
|
6
|
+
<view
|
|
7
|
+
v-for="(group, i) in abc ? engKeyBoardList : areaList"
|
|
8
|
+
:key="i"
|
|
9
|
+
class="u-keyboard__button"
|
|
10
|
+
:index="i"
|
|
11
|
+
:class="[i + 1 === 4 && 'u-keyboard__button--center']"
|
|
12
|
+
>
|
|
13
|
+
<view
|
|
14
|
+
v-if="i === 3"
|
|
15
|
+
class="u-keyboard__button__inner-wrapper"
|
|
16
|
+
>
|
|
17
|
+
<view
|
|
18
|
+
class="u-keyboard__button__inner-wrapper__left"
|
|
19
|
+
hover-class="u-hover-class"
|
|
20
|
+
:hover-stay-time="200"
|
|
21
|
+
@tap="changeCarInputMode"
|
|
22
|
+
>
|
|
23
|
+
<text
|
|
24
|
+
class="u-keyboard__button__inner-wrapper__left__lang"
|
|
25
|
+
:class="[!abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
|
|
26
|
+
>中</text>
|
|
27
|
+
<text class="u-keyboard__button__inner-wrapper__left__line">/</text>
|
|
28
|
+
<text
|
|
29
|
+
class="u-keyboard__button__inner-wrapper__left__lang"
|
|
30
|
+
:class="[abc && 'u-keyboard__button__inner-wrapper__left__lang--active']"
|
|
31
|
+
>英</text>
|
|
32
|
+
</view>
|
|
33
|
+
</view>
|
|
34
|
+
<view
|
|
35
|
+
class="u-keyboard__button__inner-wrapper"
|
|
36
|
+
v-for="(item, j) in group"
|
|
37
|
+
:key="j"
|
|
38
|
+
>
|
|
39
|
+
<view
|
|
40
|
+
class="u-keyboard__button__inner-wrapper__inner"
|
|
41
|
+
:hover-stay-time="200"
|
|
42
|
+
@tap="carInputClick(i, j)"
|
|
43
|
+
hover-class="u-hover-class"
|
|
44
|
+
>
|
|
45
|
+
<text class="u-keyboard__button__inner-wrapper__inner__text">{{ item }}</text>
|
|
46
|
+
</view>
|
|
47
|
+
</view>
|
|
48
|
+
<view
|
|
49
|
+
v-if="i === 3"
|
|
50
|
+
@touchstart="backspaceClick"
|
|
51
|
+
@touchend="clearTimer"
|
|
52
|
+
class="u-keyboard__button__inner-wrapper"
|
|
53
|
+
>
|
|
54
|
+
<view
|
|
55
|
+
class="u-keyboard__button__inner-wrapper__right"
|
|
56
|
+
hover-class="u-hover-class"
|
|
57
|
+
:hover-stay-time="200"
|
|
58
|
+
>
|
|
59
|
+
<u-icon
|
|
60
|
+
size="28"
|
|
61
|
+
name="backspace"
|
|
62
|
+
color="#303133"
|
|
63
|
+
></u-icon>
|
|
64
|
+
</view>
|
|
65
|
+
</view>
|
|
66
|
+
</view>
|
|
67
|
+
</view>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
71
|
import props from './props.js';
|
|
72
72
|
import mpMixin from '../../libs/mixin/mpMixin.js';
|
|
73
|
-
import mixin from '../../libs/mixin/mixin.js';
|
|
74
|
-
/**
|
|
75
|
-
* keyboard 键盘组件
|
|
76
|
-
* @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
|
|
77
|
-
* @tutorial https://
|
|
78
|
-
* @property {Boolean} random 是否打乱键盘的顺序
|
|
79
|
-
* @event {Function} change 点击键盘触发
|
|
80
|
-
* @event {Function} backspace 点击退格键触发
|
|
81
|
-
* @example <u-keyboard ref="uKeyboard" mode="car" v-model="show"></u-keyboard>
|
|
82
|
-
*/
|
|
83
|
-
export default {
|
|
84
|
-
name: "u-keyboard",
|
|
85
|
-
mixins: [mpMixin, mixin, props],
|
|
86
|
-
data() {
|
|
87
|
-
return {
|
|
88
|
-
// 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称
|
|
89
|
-
abc: false
|
|
90
|
-
};
|
|
91
|
-
},
|
|
92
|
-
computed: {
|
|
93
|
-
areaList() {
|
|
94
|
-
let data = [
|
|
95
|
-
'京',
|
|
96
|
-
'沪',
|
|
97
|
-
'粤',
|
|
98
|
-
'津',
|
|
99
|
-
'冀',
|
|
100
|
-
'豫',
|
|
101
|
-
'云',
|
|
102
|
-
'辽',
|
|
103
|
-
'黑',
|
|
104
|
-
'湘',
|
|
105
|
-
'皖',
|
|
106
|
-
'鲁',
|
|
107
|
-
'苏',
|
|
108
|
-
'浙',
|
|
109
|
-
'赣',
|
|
110
|
-
'鄂',
|
|
111
|
-
'桂',
|
|
112
|
-
'甘',
|
|
113
|
-
'晋',
|
|
114
|
-
'陕',
|
|
115
|
-
'蒙',
|
|
116
|
-
'吉',
|
|
117
|
-
'闽',
|
|
118
|
-
'贵',
|
|
119
|
-
'渝',
|
|
120
|
-
'川',
|
|
121
|
-
'青',
|
|
122
|
-
'琼',
|
|
123
|
-
'宁',
|
|
124
|
-
'挂',
|
|
125
|
-
'藏',
|
|
126
|
-
'港',
|
|
127
|
-
'澳',
|
|
128
|
-
'新',
|
|
129
|
-
'使',
|
|
130
|
-
'学'
|
|
131
|
-
];
|
|
132
|
-
let tmp = [];
|
|
133
|
-
// 打乱顺序
|
|
134
|
-
if (this.random) data = uni.$u.randomArray(data);
|
|
135
|
-
// 切割成二维数组
|
|
136
|
-
tmp[0] = data.slice(0, 10);
|
|
137
|
-
tmp[1] = data.slice(10, 20);
|
|
138
|
-
tmp[2] = data.slice(20, 30);
|
|
139
|
-
tmp[3] = data.slice(30, 36);
|
|
140
|
-
return tmp;
|
|
141
|
-
},
|
|
142
|
-
engKeyBoardList() {
|
|
143
|
-
let data = [
|
|
144
|
-
1,
|
|
145
|
-
2,
|
|
146
|
-
3,
|
|
147
|
-
4,
|
|
148
|
-
5,
|
|
149
|
-
6,
|
|
150
|
-
7,
|
|
151
|
-
8,
|
|
152
|
-
9,
|
|
153
|
-
0,
|
|
154
|
-
'Q',
|
|
155
|
-
'W',
|
|
156
|
-
'E',
|
|
157
|
-
'R',
|
|
158
|
-
'T',
|
|
159
|
-
'Y',
|
|
160
|
-
'U',
|
|
161
|
-
'I',
|
|
162
|
-
'O',
|
|
163
|
-
'P',
|
|
164
|
-
'A',
|
|
165
|
-
'S',
|
|
166
|
-
'D',
|
|
167
|
-
'F',
|
|
168
|
-
'G',
|
|
169
|
-
'H',
|
|
170
|
-
'J',
|
|
171
|
-
'K',
|
|
172
|
-
'L',
|
|
173
|
-
'Z',
|
|
174
|
-
'X',
|
|
175
|
-
'C',
|
|
176
|
-
'V',
|
|
177
|
-
'B',
|
|
178
|
-
'N',
|
|
179
|
-
'M'
|
|
180
|
-
];
|
|
181
|
-
let tmp = [];
|
|
182
|
-
if (this.random) data = uni.$u.randomArray(data);
|
|
183
|
-
tmp[0] = data.slice(0, 10);
|
|
184
|
-
tmp[1] = data.slice(10, 20);
|
|
185
|
-
tmp[2] = data.slice(20, 30);
|
|
186
|
-
tmp[3] = data.slice(30, 36);
|
|
187
|
-
return tmp;
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.$
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
this.timer
|
|
210
|
-
this.timer =
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
this.timer
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
$u-car-keyboard-
|
|
226
|
-
$u-car-keyboard-
|
|
227
|
-
$u-car-keyboard-button-inner-
|
|
228
|
-
$u-car-keyboard-button-
|
|
229
|
-
$u-car-keyboard-button-
|
|
230
|
-
$u-car-keyboard-button-
|
|
231
|
-
$u-car-keyboard-button-
|
|
232
|
-
$u-car-keyboard-button-
|
|
233
|
-
$u-car-keyboard-button-text-
|
|
234
|
-
$u-car-keyboard-
|
|
235
|
-
$u-car-keyboard-
|
|
236
|
-
$u-car-keyboard-
|
|
237
|
-
$u-car-keyboard-lang-
|
|
238
|
-
$u-car-keyboard-
|
|
239
|
-
$u-car-keyboard-
|
|
240
|
-
$u-car-keyboard-line-
|
|
241
|
-
$u-car-keyboard-line-
|
|
242
|
-
$u-car-keyboard-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
/* #
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
&
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
73
|
+
import mixin from '../../libs/mixin/mixin.js';
|
|
74
|
+
/**
|
|
75
|
+
* keyboard 键盘组件
|
|
76
|
+
* @description 此为uView自定义的键盘面板,内含了数字键盘,车牌号键,身份证号键盘3种模式,都有可以打乱按键顺序的选项。
|
|
77
|
+
* @tutorial https://uiadmin.net/uview-plus/components/keyboard.html
|
|
78
|
+
* @property {Boolean} random 是否打乱键盘的顺序
|
|
79
|
+
* @event {Function} change 点击键盘触发
|
|
80
|
+
* @event {Function} backspace 点击退格键触发
|
|
81
|
+
* @example <u-keyboard ref="uKeyboard" mode="car" v-model="show"></u-keyboard>
|
|
82
|
+
*/
|
|
83
|
+
export default {
|
|
84
|
+
name: "u-keyboard",
|
|
85
|
+
mixins: [mpMixin, mixin, props],
|
|
86
|
+
data() {
|
|
87
|
+
return {
|
|
88
|
+
// 车牌输入时,abc=true为输入车牌号码,bac=false为输入省份中文简称
|
|
89
|
+
abc: false
|
|
90
|
+
};
|
|
91
|
+
},
|
|
92
|
+
computed: {
|
|
93
|
+
areaList() {
|
|
94
|
+
let data = [
|
|
95
|
+
'京',
|
|
96
|
+
'沪',
|
|
97
|
+
'粤',
|
|
98
|
+
'津',
|
|
99
|
+
'冀',
|
|
100
|
+
'豫',
|
|
101
|
+
'云',
|
|
102
|
+
'辽',
|
|
103
|
+
'黑',
|
|
104
|
+
'湘',
|
|
105
|
+
'皖',
|
|
106
|
+
'鲁',
|
|
107
|
+
'苏',
|
|
108
|
+
'浙',
|
|
109
|
+
'赣',
|
|
110
|
+
'鄂',
|
|
111
|
+
'桂',
|
|
112
|
+
'甘',
|
|
113
|
+
'晋',
|
|
114
|
+
'陕',
|
|
115
|
+
'蒙',
|
|
116
|
+
'吉',
|
|
117
|
+
'闽',
|
|
118
|
+
'贵',
|
|
119
|
+
'渝',
|
|
120
|
+
'川',
|
|
121
|
+
'青',
|
|
122
|
+
'琼',
|
|
123
|
+
'宁',
|
|
124
|
+
'挂',
|
|
125
|
+
'藏',
|
|
126
|
+
'港',
|
|
127
|
+
'澳',
|
|
128
|
+
'新',
|
|
129
|
+
'使',
|
|
130
|
+
'学'
|
|
131
|
+
];
|
|
132
|
+
let tmp = [];
|
|
133
|
+
// 打乱顺序
|
|
134
|
+
if (this.random) data = uni.$u.randomArray(data);
|
|
135
|
+
// 切割成二维数组
|
|
136
|
+
tmp[0] = data.slice(0, 10);
|
|
137
|
+
tmp[1] = data.slice(10, 20);
|
|
138
|
+
tmp[2] = data.slice(20, 30);
|
|
139
|
+
tmp[3] = data.slice(30, 36);
|
|
140
|
+
return tmp;
|
|
141
|
+
},
|
|
142
|
+
engKeyBoardList() {
|
|
143
|
+
let data = [
|
|
144
|
+
1,
|
|
145
|
+
2,
|
|
146
|
+
3,
|
|
147
|
+
4,
|
|
148
|
+
5,
|
|
149
|
+
6,
|
|
150
|
+
7,
|
|
151
|
+
8,
|
|
152
|
+
9,
|
|
153
|
+
0,
|
|
154
|
+
'Q',
|
|
155
|
+
'W',
|
|
156
|
+
'E',
|
|
157
|
+
'R',
|
|
158
|
+
'T',
|
|
159
|
+
'Y',
|
|
160
|
+
'U',
|
|
161
|
+
'I',
|
|
162
|
+
'O',
|
|
163
|
+
'P',
|
|
164
|
+
'A',
|
|
165
|
+
'S',
|
|
166
|
+
'D',
|
|
167
|
+
'F',
|
|
168
|
+
'G',
|
|
169
|
+
'H',
|
|
170
|
+
'J',
|
|
171
|
+
'K',
|
|
172
|
+
'L',
|
|
173
|
+
'Z',
|
|
174
|
+
'X',
|
|
175
|
+
'C',
|
|
176
|
+
'V',
|
|
177
|
+
'B',
|
|
178
|
+
'N',
|
|
179
|
+
'M'
|
|
180
|
+
];
|
|
181
|
+
let tmp = [];
|
|
182
|
+
if (this.random) data = uni.$u.randomArray(data);
|
|
183
|
+
tmp[0] = data.slice(0, 10);
|
|
184
|
+
tmp[1] = data.slice(10, 20);
|
|
185
|
+
tmp[2] = data.slice(20, 30);
|
|
186
|
+
tmp[3] = data.slice(30, 36);
|
|
187
|
+
return tmp;
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
emits: ["change", "backspace"],
|
|
191
|
+
methods: {
|
|
192
|
+
// 点击键盘按钮
|
|
193
|
+
carInputClick(i, j) {
|
|
194
|
+
let value = '';
|
|
195
|
+
// 不同模式,获取不同数组的值
|
|
196
|
+
if (this.abc) value = this.engKeyBoardList[i][j];
|
|
197
|
+
else value = this.areaList[i][j];
|
|
198
|
+
// 如果允许自动切换,则将中文状态切换为英文
|
|
199
|
+
if (!this.abc && this.autoChange) uni.$u.sleep(200).then(() => this.abc = true)
|
|
200
|
+
this.$emit('change', value);
|
|
201
|
+
},
|
|
202
|
+
// 修改汽车牌键盘的输入模式,中文|英文
|
|
203
|
+
changeCarInputMode() {
|
|
204
|
+
this.abc = !this.abc;
|
|
205
|
+
},
|
|
206
|
+
// 点击退格键
|
|
207
|
+
backspaceClick() {
|
|
208
|
+
this.$emit('backspace');
|
|
209
|
+
clearInterval(this.timer); //再次清空定时器,防止重复注册定时器
|
|
210
|
+
this.timer = null;
|
|
211
|
+
this.timer = setInterval(() => {
|
|
212
|
+
this.$emit('backspace');
|
|
213
|
+
}, 250);
|
|
214
|
+
},
|
|
215
|
+
clearTimer() {
|
|
216
|
+
clearInterval(this.timer);
|
|
217
|
+
this.timer = null;
|
|
218
|
+
},
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
</script>
|
|
222
|
+
|
|
223
|
+
<style lang="scss" scoped>
|
|
224
|
+
@import "../../libs/css/components.scss";
|
|
225
|
+
$u-car-keyboard-background-color: rgb(224, 228, 230) !default;
|
|
226
|
+
$u-car-keyboard-padding:6px 0 6px !default;
|
|
227
|
+
$u-car-keyboard-button-inner-width:64rpx !default;
|
|
228
|
+
$u-car-keyboard-button-inner-background-color:#FFFFFF !default;
|
|
229
|
+
$u-car-keyboard-button-height:80rpx !default;
|
|
230
|
+
$u-car-keyboard-button-inner-box-shadow:0 1px 0px #999992 !default;
|
|
231
|
+
$u-car-keyboard-button-border-radius:4px !default;
|
|
232
|
+
$u-car-keyboard-button-inner-margin:8rpx 5rpx !default;
|
|
233
|
+
$u-car-keyboard-button-text-font-size:16px !default;
|
|
234
|
+
$u-car-keyboard-button-text-color:$u-main-color !default;
|
|
235
|
+
$u-car-keyboard-center-inner-margin: 0 4rpx !default;
|
|
236
|
+
$u-car-keyboard-special-button-width:134rpx !default;
|
|
237
|
+
$u-car-keyboard-lang-font-size:16px !default;
|
|
238
|
+
$u-car-keyboard-lang-color:$u-main-color !default;
|
|
239
|
+
$u-car-keyboard-active-color:$u-primary !default;
|
|
240
|
+
$u-car-keyboard-line-font-size:15px !default;
|
|
241
|
+
$u-car-keyboard-line-color:$u-main-color !default;
|
|
242
|
+
$u-car-keyboard-line-margin:0 1px !default;
|
|
243
|
+
$u-car-keyboard-u-hover-class-background-color:#BBBCC6 !default;
|
|
244
|
+
|
|
245
|
+
.u-keyboard {
|
|
246
|
+
@include flex(column);
|
|
247
|
+
justify-content: space-around;
|
|
248
|
+
background-color: $u-car-keyboard-background-color;
|
|
249
|
+
align-items: stretch;
|
|
250
|
+
padding: $u-car-keyboard-padding;
|
|
251
|
+
|
|
252
|
+
&__button {
|
|
253
|
+
@include flex;
|
|
254
|
+
justify-content: center;
|
|
255
|
+
flex: 1;
|
|
256
|
+
/* #ifndef APP-NVUE */
|
|
257
|
+
/* #endif */
|
|
258
|
+
|
|
259
|
+
&__inner-wrapper {
|
|
260
|
+
box-shadow: $u-car-keyboard-button-inner-box-shadow;
|
|
261
|
+
margin: $u-car-keyboard-button-inner-margin;
|
|
262
|
+
border-radius: $u-car-keyboard-button-border-radius;
|
|
263
|
+
|
|
264
|
+
&__inner {
|
|
265
|
+
@include flex;
|
|
266
|
+
justify-content: center;
|
|
267
|
+
align-items: center;
|
|
268
|
+
width: $u-car-keyboard-button-inner-width;
|
|
269
|
+
background-color: $u-car-keyboard-button-inner-background-color;
|
|
270
|
+
height: $u-car-keyboard-button-height;
|
|
271
|
+
border-radius: $u-car-keyboard-button-border-radius;
|
|
272
|
+
|
|
273
|
+
&__text {
|
|
274
|
+
font-size: $u-car-keyboard-button-text-font-size;
|
|
275
|
+
color: $u-car-keyboard-button-text-color;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&__left,
|
|
280
|
+
&__right {
|
|
281
|
+
border-radius: $u-car-keyboard-button-border-radius;
|
|
282
|
+
width: $u-car-keyboard-special-button-width;
|
|
283
|
+
height: $u-car-keyboard-button-height;
|
|
284
|
+
background-color: $u-car-keyboard-u-hover-class-background-color;
|
|
285
|
+
@include flex;
|
|
286
|
+
justify-content: center;
|
|
287
|
+
align-items: center;
|
|
288
|
+
box-shadow: $u-car-keyboard-button-inner-box-shadow;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&__left {
|
|
292
|
+
&__line {
|
|
293
|
+
font-size: $u-car-keyboard-line-font-size;
|
|
294
|
+
color: $u-car-keyboard-line-color;
|
|
295
|
+
margin: $u-car-keyboard-line-margin;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
&__lang {
|
|
299
|
+
font-size: $u-car-keyboard-lang-font-size;
|
|
300
|
+
color: $u-car-keyboard-lang-color;
|
|
301
|
+
|
|
302
|
+
&--active {
|
|
303
|
+
color: $u-car-keyboard-active-color;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.u-hover-class {
|
|
312
|
+
background-color: $u-car-keyboard-u-hover-class-background-color;
|
|
313
|
+
}
|
|
314
|
+
</style>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
/**
|
|
47
47
|
* cell 单元格
|
|
48
48
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
|
|
49
|
-
* @tutorial https://
|
|
49
|
+
* @tutorial https://uiadmin.net/uview-plus/components/cell.html
|
|
50
50
|
* @property {String | Number} title 标题
|
|
51
51
|
* @property {String | Number} label 标题下方的描述信息
|
|
52
52
|
* @property {String | Number} value 右侧的内容
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
/**
|
|
20
20
|
* cellGroup 单元格
|
|
21
21
|
* @description cell单元格一般用于一组列表的情况,比如个人中心页,设置页等。
|
|
22
|
-
* @tutorial https://
|
|
22
|
+
* @tutorial https://uiadmin.net/uview-plus/components/cell.html
|
|
23
23
|
*
|
|
24
24
|
* @property {String} title 分组标题
|
|
25
25
|
* @property {Boolean} border 是否显示外边框 (默认 true )
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
/**
|
|
39
39
|
* checkbox 复选框
|
|
40
40
|
* @description 复选框组件一般用于需要多个选择的场景,该组件功能完整,使用方便
|
|
41
|
-
* @tutorial https://
|
|
41
|
+
* @tutorial https://uiadmin.net/uview-plus/components/checkbox.html
|
|
42
42
|
* @property {String | Number | Boolean} name checkbox组件的标示符
|
|
43
43
|
* @property {String} shape 形状,square为方形,circle为圆型
|
|
44
44
|
* @property {String | Number} size 整体的大小
|
|
@@ -181,6 +181,7 @@
|
|
|
181
181
|
mounted() {
|
|
182
182
|
this.init()
|
|
183
183
|
},
|
|
184
|
+
emits: ["change"],
|
|
184
185
|
methods: {
|
|
185
186
|
init() {
|
|
186
187
|
// 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
|