renusify 1.1.0 → 1.1.2
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/components/avatar/index.vue +10 -10
- package/components/button/style.scss +2 -1
- package/components/calendar/index.vue +3 -1
- package/components/chip/index.vue +1 -1
- package/components/chip/style.scss +1 -1
- package/components/content/index.vue +43 -3
- package/components/form/fileUploader/single.vue +1 -1
- package/components/form/input.vue +62 -19
- package/components/form/select.vue +1 -0
- package/components/form/timepicker/index.vue +6 -0
- package/components/form/timepicker/range.vue +166 -0
- package/components/form/timepicker/timepicker.vue +633 -624
- package/components/index.js +1 -0
- package/components/progress/liner.vue +17 -15
- package/components/progress/style.scss +0 -1
- package/index.js +1 -0
- package/package.json +1 -1
- package/style/app.scss +1 -1
- package/tools/helper.js +20 -0
- package/components/content/style.scss +0 -40
|
@@ -1,649 +1,658 @@
|
|
|
1
1
|
<template>
|
|
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
|
-
|
|
2
|
+
<div :class="`${$r.prefix}timepicker-clock`">
|
|
3
|
+
<div ref="clock" class="clock ltr">
|
|
4
|
+
<div ref="circle" class="circle" :class="{ 'is-small': isSmall }"></div>
|
|
5
|
+
<div ref="center" class="center"></div>
|
|
6
|
+
<div ref="hand" class="clock-item-hand hour"></div>
|
|
7
|
+
|
|
8
|
+
<div
|
|
9
|
+
v-for="(num, i) in nums"
|
|
10
|
+
:key="i"
|
|
11
|
+
class="number"
|
|
12
|
+
:class="['number' + i,{'number-disabled':disableTime(parseInt(i),show,hour,min,sec)}]"
|
|
13
|
+
:ref="'number' + i"
|
|
14
|
+
@click="set(i)"
|
|
15
|
+
>
|
|
16
|
+
{{ num }}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="text-meridiem ltr" v-if="!is24Hour">
|
|
20
|
+
<div
|
|
21
|
+
class="time-meridiem"
|
|
22
|
+
@click="(meridiem = 'AM'),emit()"
|
|
23
|
+
:class="{ 'meridiem-active': meridiem === 'AM' }"
|
|
24
|
+
>
|
|
25
|
+
{{ $t('timepicker_am', 'renusify') }}
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
class="time-meridiem"
|
|
29
|
+
@click="(meridiem = 'PM'),emit()"
|
|
30
|
+
:class="{ 'meridiem-active': meridiem === 'PM' }"
|
|
31
|
+
>
|
|
32
|
+
{{ $t('timepicker_pm', 'renusify') }}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="text-time ltr">
|
|
36
|
+
<input
|
|
37
|
+
@input="emit"
|
|
38
|
+
v-model="hour"
|
|
39
|
+
placeholder="00"
|
|
40
|
+
@update:model-value="handle_hour()"
|
|
41
|
+
@click.prevent.stop="handle_hour(false)"
|
|
42
|
+
class="time-show"
|
|
43
|
+
:class="{
|
|
44
44
|
'time-active': show === 'hours24'||show==='hours12',
|
|
45
45
|
'time-selected': hour != null
|
|
46
46
|
}"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
47
|
+
/>
|
|
48
|
+
<div class="t-text">:</div>
|
|
49
|
+
<input
|
|
50
|
+
@input="emit"
|
|
51
|
+
v-model="min"
|
|
52
|
+
placeholder="00"
|
|
53
|
+
@update:model-value="handle_min()"
|
|
54
|
+
@click.prevent.stop="handle_min(false)"
|
|
55
|
+
class="time-show"
|
|
56
|
+
:class="{
|
|
57
57
|
'time-active': show === 'mins',
|
|
58
58
|
'time-selected': min != null
|
|
59
59
|
}"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
/>
|
|
61
|
+
<div class="t-text" v-if="withSec">:</div>
|
|
62
|
+
<input
|
|
63
|
+
@input="emit"
|
|
64
|
+
v-if="withSec"
|
|
65
|
+
v-model="sec"
|
|
66
|
+
placeholder="00"
|
|
67
|
+
@update:model-value="handle_sec()"
|
|
68
|
+
@click.prevent.stop="handle_sec(false)"
|
|
69
|
+
class="time-show"
|
|
70
|
+
:class="{
|
|
71
71
|
'time-active': show === 'seconds',
|
|
72
72
|
'time-selected': sec != null
|
|
73
73
|
}"
|
|
74
|
-
|
|
75
|
-
</div>
|
|
74
|
+
/>
|
|
76
75
|
</div>
|
|
76
|
+
</div>
|
|
77
77
|
</template>
|
|
78
78
|
|
|
79
79
|
<script>
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
},
|
|
266
|
-
computed: {
|
|
267
|
-
nums() {
|
|
268
|
-
return this[this.show];
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
methods: {
|
|
272
|
-
parser(txt) {
|
|
273
|
-
if (!txt) {
|
|
274
|
-
return
|
|
275
|
-
}
|
|
276
|
-
txt = txt.split(' ')
|
|
277
|
-
if (txt.length === 2) {
|
|
278
|
-
this.meridiem = txt[1]
|
|
279
|
-
}
|
|
280
|
-
txt = txt[0].split(':')
|
|
281
|
-
this.hour = parseInt(txt[0])
|
|
282
|
-
this.min = parseInt(txt[1])
|
|
283
|
-
this.handle_hour(false)
|
|
284
|
-
},
|
|
285
|
-
emit() {
|
|
286
|
-
let hour = this.hour
|
|
287
|
-
let min = this.min
|
|
288
|
-
let sec = this.sec
|
|
289
|
-
if (hour < 10) {
|
|
290
|
-
hour = '0' + hour;
|
|
291
|
-
}
|
|
292
|
-
if (min < 10) {
|
|
293
|
-
min = '0' + min;
|
|
294
|
-
}
|
|
295
|
-
if (sec < 10) {
|
|
296
|
-
sec = '0' + sec;
|
|
297
|
-
}
|
|
298
|
-
let n = hour + ":" + min;
|
|
299
|
-
if (this.withSec) {
|
|
300
|
-
n += ":" + sec;
|
|
301
|
-
}
|
|
302
|
-
if (!this.is24Hour) {
|
|
303
|
-
n += " " + this.meridiem;
|
|
304
|
-
}
|
|
305
|
-
this.$emit("update:model-value", n);
|
|
306
|
-
if ((min !== null && !this.withSec) || sec !== null) {
|
|
307
|
-
this.$emit("finish", true);
|
|
308
|
-
}
|
|
309
|
-
},
|
|
310
|
-
handle_hour(next = true) {
|
|
311
|
-
if (this.hour > (this.is24Hour ? 23 : 12)) {
|
|
312
|
-
this.hour = this.is24Hour ? 23 : 12;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
this.show = this.is24Hour ? "hours24" : "hours12";
|
|
316
|
-
setTimeout(() => {
|
|
317
|
-
this.setup_hour();
|
|
318
|
-
this.hour && this.set(this.hour, next);
|
|
319
|
-
}, 10);
|
|
320
|
-
},
|
|
321
|
-
handle_min(next = true) {
|
|
322
|
-
if (this.min > 59) {
|
|
323
|
-
this.min = 59;
|
|
324
|
-
}
|
|
325
|
-
this.show = "mins";
|
|
326
|
-
|
|
327
|
-
setTimeout(() => {
|
|
328
|
-
this.setup_min();
|
|
329
|
-
this.min && this.set(this.min, next);
|
|
330
|
-
}, 10);
|
|
331
|
-
},
|
|
332
|
-
handle_sec(next = true) {
|
|
333
|
-
if (this.sec > 59) {
|
|
334
|
-
this.sec = 59;
|
|
335
|
-
}
|
|
336
|
-
this.show = "seconds";
|
|
337
|
-
setTimeout(() => {
|
|
338
|
-
this.setup_min();
|
|
339
|
-
this.sec && this.set(this.sec, next);
|
|
340
|
-
}, 10);
|
|
341
|
-
},
|
|
342
|
-
|
|
343
|
-
set(h, next = true) {
|
|
344
|
-
h = parseInt(h);
|
|
345
|
-
const circle = this.$refs.circle;
|
|
346
|
-
const cl = this.$refs["number" + h];
|
|
347
|
-
const hand = this.$refs.hand;
|
|
348
|
-
const clock = this.$refs.clock.getBoundingClientRect();
|
|
349
|
-
|
|
350
|
-
const b = cl.getBoundingClientRect();
|
|
351
|
-
circle.style.top = parseInt(cl.style.top) + 10 + "px";
|
|
352
|
-
circle.style.left = parseInt(cl.style.left) + 10 + "px";
|
|
353
|
-
|
|
354
|
-
let ang = this.angle(
|
|
355
|
-
b.left + 10,
|
|
356
|
-
b.top + 10,
|
|
357
|
-
clock.width / 2 + clock.left,
|
|
358
|
-
clock.top,
|
|
359
|
-
clock.width / 2 + clock.left,
|
|
360
|
-
clock.height / 2 + clock.top
|
|
361
|
-
);
|
|
362
|
-
if (
|
|
363
|
-
(this.show === "hours24" || this.show === "hours12") &&
|
|
364
|
-
((h > 6 && h < 13) || (h > 18 && h <= 23))
|
|
365
|
-
) {
|
|
366
|
-
ang = 180 + 180 - ang;
|
|
367
|
-
} else if (h > 30) {
|
|
368
|
-
ang = 180 + 180 - ang;
|
|
369
|
-
}
|
|
370
|
-
hand.style.transform = "rotate(" + ang + "deg)";
|
|
371
|
-
|
|
372
|
-
if (this.show === "hours24" && (h === 0 || h >= 13)) {
|
|
373
|
-
hand.style.height = "60px";
|
|
374
|
-
} else {
|
|
375
|
-
hand.style.height = "100px";
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
if (!next) {
|
|
379
|
-
return
|
|
380
|
-
}
|
|
381
|
-
if (this.show === "hours24") {
|
|
382
|
-
this.show = "mins";
|
|
383
|
-
this.hour = h;
|
|
384
|
-
setTimeout(() => {
|
|
385
|
-
this.setup_min();
|
|
386
|
-
}, 10);
|
|
387
|
-
} else if (this.show === "hours12") {
|
|
388
|
-
this.show = "mins";
|
|
389
|
-
setTimeout(() => {
|
|
390
|
-
this.setup_min();
|
|
391
|
-
}, 10);
|
|
392
|
-
this.hour = h;
|
|
393
|
-
} else if (this.show === "mins") {
|
|
394
|
-
this.min = h;
|
|
395
|
-
if ([0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55].includes(h)) {
|
|
396
|
-
this.isSmall = false;
|
|
397
|
-
this.isHand = false;
|
|
398
|
-
} else {
|
|
399
|
-
this.isSmall = true;
|
|
400
|
-
this.isHand = true;
|
|
401
|
-
}
|
|
402
|
-
if (this.withSec) {
|
|
403
|
-
this.show = "seconds";
|
|
404
|
-
setTimeout(() => {
|
|
405
|
-
this.setup_min();
|
|
406
|
-
}, 10);
|
|
407
|
-
}
|
|
408
|
-
} else {
|
|
409
|
-
this.sec = h;
|
|
410
|
-
}
|
|
411
|
-
this.emit();
|
|
412
|
-
},
|
|
413
|
-
angle(p1x, p1y, p2x, p2y, p3x, p3y) {
|
|
414
|
-
let p0c = Math.sqrt(Math.pow(p3x - p1x, 2) + Math.pow(p3y - p1y, 2));
|
|
415
|
-
let p1c = Math.sqrt(Math.pow(p3x - p2x, 2) + Math.pow(p3y - p2y, 2));
|
|
416
|
-
let p0p1 = Math.sqrt(Math.pow(p2x - p1x, 2) + Math.pow(p2y - p1y, 2));
|
|
417
|
-
return (
|
|
418
|
-
Math.acos((p1c * p1c + p0c * p0c - p0p1 * p0p1) / (2 * p1c * p0c)) *
|
|
419
|
-
(180 / Math.PI)
|
|
420
|
-
);
|
|
421
|
-
},
|
|
422
|
-
|
|
423
|
-
movePointAtAngle(point, angle, distance) {
|
|
424
|
-
return [
|
|
425
|
-
point[0] + Math.sin(angle) * distance,
|
|
426
|
-
point[1] - Math.cos(angle) * distance
|
|
427
|
-
];
|
|
428
|
-
},
|
|
429
|
-
|
|
430
|
-
print_point(n, lng, nums = 12) {
|
|
431
|
-
return this.movePointAtAngle([130, 130], ((Math.PI * 2) / nums) * n, lng);
|
|
432
|
-
},
|
|
433
|
-
setup_hour() {
|
|
434
|
-
let cl = null;
|
|
435
|
-
let po = null;
|
|
436
|
-
for (let i = 1; i <= 12; i++) {
|
|
437
|
-
cl = this.$refs["number" + i];
|
|
438
|
-
po = this.print_point(i, 110);
|
|
439
|
-
cl.style.left = po[0] - 10 + "px";
|
|
440
|
-
cl.style.top = po[1] - 10 + "px";
|
|
441
|
-
cl.classList.add('number-show')
|
|
442
|
-
}
|
|
443
|
-
if (this.is24Hour) {
|
|
444
|
-
for (let i = 13; i <= 23; i++) {
|
|
445
|
-
cl = this.$refs["number" + i];
|
|
446
|
-
po = this.print_point(i, 70);
|
|
447
|
-
cl.style.left = po[0] - 10 + "px";
|
|
448
|
-
cl.style.top = po[1] - 10 + "px";
|
|
449
|
-
cl.classList.add('number-show')
|
|
450
|
-
}
|
|
451
|
-
cl = this.$refs["number0"];
|
|
452
|
-
po = this.print_point(0, 70);
|
|
453
|
-
cl.style.left = po[0] - 10 + "px";
|
|
454
|
-
cl.style.top = po[1] - 10 + "px";
|
|
455
|
-
cl.classList.add('number-show')
|
|
456
|
-
}
|
|
457
|
-
},
|
|
458
|
-
setup_min() {
|
|
459
|
-
const circle = this.$refs.circle;
|
|
460
|
-
circle.style.left = "130px";
|
|
461
|
-
circle.style.top = "20px";
|
|
462
|
-
|
|
463
|
-
const clock = this.$refs.hand;
|
|
464
|
-
clock.style.transform = "rotate(0)";
|
|
465
|
-
clock.style.height = "100px";
|
|
466
|
-
|
|
467
|
-
let cl = null;
|
|
468
|
-
let po = null;
|
|
469
|
-
for (let i = 0; i <= 59; i++) {
|
|
470
|
-
cl = this.$refs["number" + i];
|
|
471
|
-
po = this.print_point(i, 110, 60);
|
|
472
|
-
cl.style.left = po[0] - 10 + "px";
|
|
473
|
-
cl.style.top = po[1] - 10 + "px";
|
|
474
|
-
cl.classList.add('number-show')
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
}
|
|
80
|
+
export default {
|
|
81
|
+
name: "timepicker",
|
|
82
|
+
props: {
|
|
83
|
+
disableTime: {
|
|
84
|
+
type: Function, default: () => {
|
|
85
|
+
return false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
withSec: Boolean,
|
|
89
|
+
is24Hour: Boolean,
|
|
90
|
+
modelValue: String
|
|
91
|
+
},
|
|
92
|
+
data() {
|
|
93
|
+
return {
|
|
94
|
+
show: this.is24Hour ? "hours24" : "hours12",
|
|
95
|
+
hour: 0,
|
|
96
|
+
meridiem: "AM",
|
|
97
|
+
min: 0,
|
|
98
|
+
sec: 0,
|
|
99
|
+
isSmall: false,
|
|
100
|
+
isHand: false,
|
|
101
|
+
hours12: {
|
|
102
|
+
1: "1",
|
|
103
|
+
2: "2",
|
|
104
|
+
3: "3",
|
|
105
|
+
4: "4",
|
|
106
|
+
5: "5",
|
|
107
|
+
6: "6",
|
|
108
|
+
7: "7",
|
|
109
|
+
8: "8",
|
|
110
|
+
9: "9",
|
|
111
|
+
10: "10",
|
|
112
|
+
11: "11",
|
|
113
|
+
12: "12"
|
|
114
|
+
},
|
|
115
|
+
hours24: {
|
|
116
|
+
1: "1",
|
|
117
|
+
2: "2",
|
|
118
|
+
3: "3",
|
|
119
|
+
4: "4",
|
|
120
|
+
5: "5",
|
|
121
|
+
6: "6",
|
|
122
|
+
7: "7",
|
|
123
|
+
8: "8",
|
|
124
|
+
9: "9",
|
|
125
|
+
10: "10",
|
|
126
|
+
11: "11",
|
|
127
|
+
12: "12",
|
|
128
|
+
0: "0",
|
|
129
|
+
13: "13",
|
|
130
|
+
14: "14",
|
|
131
|
+
15: "15",
|
|
132
|
+
16: "16",
|
|
133
|
+
17: "17",
|
|
134
|
+
18: "18",
|
|
135
|
+
19: "19",
|
|
136
|
+
20: "20",
|
|
137
|
+
21: "21",
|
|
138
|
+
22: "22",
|
|
139
|
+
23: "23"
|
|
140
|
+
},
|
|
141
|
+
mins: {
|
|
142
|
+
0: "0",
|
|
143
|
+
1: "",
|
|
144
|
+
2: "",
|
|
145
|
+
3: "",
|
|
146
|
+
4: "",
|
|
147
|
+
5: "5",
|
|
148
|
+
6: "",
|
|
149
|
+
7: "",
|
|
150
|
+
8: "",
|
|
151
|
+
9: "",
|
|
152
|
+
10: "10",
|
|
153
|
+
11: "",
|
|
154
|
+
12: "",
|
|
155
|
+
13: "",
|
|
156
|
+
14: "",
|
|
157
|
+
15: "15",
|
|
158
|
+
16: "",
|
|
159
|
+
17: "",
|
|
160
|
+
18: "",
|
|
161
|
+
19: "",
|
|
162
|
+
20: "20",
|
|
163
|
+
21: "",
|
|
164
|
+
22: "",
|
|
165
|
+
23: "",
|
|
166
|
+
24: "",
|
|
167
|
+
25: "25",
|
|
168
|
+
26: "",
|
|
169
|
+
27: "",
|
|
170
|
+
28: "",
|
|
171
|
+
29: "",
|
|
172
|
+
30: "30",
|
|
173
|
+
31: "",
|
|
174
|
+
32: "",
|
|
175
|
+
33: "",
|
|
176
|
+
34: "",
|
|
177
|
+
35: "35",
|
|
178
|
+
36: "",
|
|
179
|
+
37: "",
|
|
180
|
+
38: "",
|
|
181
|
+
39: "",
|
|
182
|
+
40: "40",
|
|
183
|
+
41: "",
|
|
184
|
+
42: "",
|
|
185
|
+
43: "",
|
|
186
|
+
44: "",
|
|
187
|
+
45: "45",
|
|
188
|
+
46: "",
|
|
189
|
+
47: "",
|
|
190
|
+
48: "",
|
|
191
|
+
49: "",
|
|
192
|
+
50: "50",
|
|
193
|
+
51: "",
|
|
194
|
+
52: "",
|
|
195
|
+
53: "",
|
|
196
|
+
54: "",
|
|
197
|
+
55: "55",
|
|
198
|
+
56: "",
|
|
199
|
+
57: "",
|
|
200
|
+
58: "",
|
|
201
|
+
59: ""
|
|
202
|
+
},
|
|
203
|
+
seconds: {
|
|
204
|
+
0: "0",
|
|
205
|
+
1: "",
|
|
206
|
+
2: "",
|
|
207
|
+
3: "",
|
|
208
|
+
4: "",
|
|
209
|
+
5: "5",
|
|
210
|
+
6: "",
|
|
211
|
+
7: "",
|
|
212
|
+
8: "",
|
|
213
|
+
9: "",
|
|
214
|
+
10: "10",
|
|
215
|
+
11: "",
|
|
216
|
+
12: "",
|
|
217
|
+
13: "",
|
|
218
|
+
14: "",
|
|
219
|
+
15: "15",
|
|
220
|
+
16: "",
|
|
221
|
+
17: "",
|
|
222
|
+
18: "",
|
|
223
|
+
19: "",
|
|
224
|
+
20: "20",
|
|
225
|
+
21: "",
|
|
226
|
+
22: "",
|
|
227
|
+
23: "",
|
|
228
|
+
24: "",
|
|
229
|
+
25: "25",
|
|
230
|
+
26: "",
|
|
231
|
+
27: "",
|
|
232
|
+
28: "",
|
|
233
|
+
29: "",
|
|
234
|
+
30: "30",
|
|
235
|
+
31: "",
|
|
236
|
+
32: "",
|
|
237
|
+
33: "",
|
|
238
|
+
34: "",
|
|
239
|
+
35: "35",
|
|
240
|
+
36: "",
|
|
241
|
+
37: "",
|
|
242
|
+
38: "",
|
|
243
|
+
39: "",
|
|
244
|
+
40: "40",
|
|
245
|
+
41: "",
|
|
246
|
+
42: "",
|
|
247
|
+
43: "",
|
|
248
|
+
44: "",
|
|
249
|
+
45: "45",
|
|
250
|
+
46: "",
|
|
251
|
+
47: "",
|
|
252
|
+
48: "",
|
|
253
|
+
49: "",
|
|
254
|
+
50: "50",
|
|
255
|
+
51: "",
|
|
256
|
+
52: "",
|
|
257
|
+
53: "",
|
|
258
|
+
54: "",
|
|
259
|
+
55: "55",
|
|
260
|
+
56: "",
|
|
261
|
+
57: "",
|
|
262
|
+
58: "",
|
|
263
|
+
59: ""
|
|
264
|
+
}
|
|
478
265
|
};
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
width: 260px;
|
|
494
|
-
height: 60px;
|
|
495
|
-
color: #818181;
|
|
496
|
-
font-size: 30px;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.text-time > .time-show {
|
|
500
|
-
background-color: #e0e0e0;
|
|
501
|
-
width: 60px;
|
|
502
|
-
text-align: center;
|
|
503
|
-
border-radius: 10px;
|
|
504
|
-
padding-top: 10px;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
.text-meridiem {
|
|
508
|
-
display: flex;
|
|
509
|
-
justify-content: space-between;
|
|
510
|
-
width: 260px;
|
|
511
|
-
height: 40px;
|
|
512
|
-
color: #818181;
|
|
513
|
-
font-size: 16px;
|
|
514
|
-
margin-top: -20px;
|
|
515
|
-
padding: 20px;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.meridiem-active {
|
|
519
|
-
background-color: var(--color-timepicker);
|
|
520
|
-
color: #fff;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
.text-meridiem > .time-meridiem {
|
|
524
|
-
width: 40px;
|
|
525
|
-
height: 40px;
|
|
526
|
-
text-align: center;
|
|
527
|
-
border-radius: 10px;
|
|
528
|
-
padding: 12px 5px 5px 5px;
|
|
529
|
-
border: 1px solid #e0e0e0;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
.text-time > .t-text {
|
|
533
|
-
text-align: center;
|
|
534
|
-
padding: 20px 5px 0 5px;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
.time-selected {
|
|
538
|
-
color: #141414;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
.clock {
|
|
542
|
-
width: 260px;
|
|
543
|
-
height: 260px;
|
|
544
|
-
background: #e0e0e0;
|
|
545
|
-
border-radius: 50%;
|
|
546
|
-
position: relative;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
.clock > .number:hover {
|
|
550
|
-
cursor: pointer;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
.clock > .number {
|
|
554
|
-
position: absolute;
|
|
555
|
-
width: 20px;
|
|
556
|
-
height: 20px;
|
|
557
|
-
font-size: 15px;
|
|
558
|
-
font-weight: 600;
|
|
559
|
-
transform-origin: left top;
|
|
560
|
-
text-align: center;
|
|
561
|
-
z-index: 20;
|
|
562
|
-
white-space: nowrap;
|
|
563
|
-
opacity: 0;
|
|
266
|
+
},
|
|
267
|
+
mounted() {
|
|
268
|
+
this.setup_hour();
|
|
269
|
+
this.parser(this.modelValue)
|
|
270
|
+
},
|
|
271
|
+
computed: {
|
|
272
|
+
nums() {
|
|
273
|
+
return this[this.show];
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
methods: {
|
|
277
|
+
parser(txt) {
|
|
278
|
+
if (!txt) {
|
|
279
|
+
return
|
|
564
280
|
}
|
|
565
|
-
|
|
566
|
-
.
|
|
567
|
-
|
|
281
|
+
txt = txt.split(' ')
|
|
282
|
+
if (txt.length === 2) {
|
|
283
|
+
this.meridiem = txt[1]
|
|
284
|
+
}
|
|
285
|
+
txt = txt[0].split(':')
|
|
286
|
+
this.hour = parseInt(txt[0])
|
|
287
|
+
this.min = parseInt(txt[1])
|
|
288
|
+
this.handle_hour(false)
|
|
289
|
+
},
|
|
290
|
+
emit() {
|
|
291
|
+
let hour = this.hour
|
|
292
|
+
let min = this.min
|
|
293
|
+
let sec = this.sec
|
|
294
|
+
if (hour < 10) {
|
|
295
|
+
hour = '0' + hour;
|
|
296
|
+
}
|
|
297
|
+
if (min < 10) {
|
|
298
|
+
min = '0' + min;
|
|
299
|
+
}
|
|
300
|
+
if (sec < 10) {
|
|
301
|
+
sec = '0' + sec;
|
|
302
|
+
}
|
|
303
|
+
let n = hour + ":" + min;
|
|
304
|
+
if (this.withSec) {
|
|
305
|
+
n += ":" + sec;
|
|
306
|
+
}
|
|
307
|
+
if (!this.is24Hour) {
|
|
308
|
+
n += " " + this.meridiem;
|
|
309
|
+
}
|
|
310
|
+
this.$emit("update:model-value", n);
|
|
311
|
+
if ((min !== null && !this.withSec) || sec !== null) {
|
|
312
|
+
this.$emit("finish", true);
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
handle_hour(next = true) {
|
|
316
|
+
if (this.hour > (this.is24Hour ? 23 : 12)) {
|
|
317
|
+
this.hour = this.is24Hour ? 23 : 12;
|
|
568
318
|
}
|
|
569
319
|
|
|
570
|
-
.
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
.
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
320
|
+
this.show = this.is24Hour ? "hours24" : "hours12";
|
|
321
|
+
setTimeout(() => {
|
|
322
|
+
this.setup_hour();
|
|
323
|
+
this.hour && this.set(this.hour, next);
|
|
324
|
+
}, 10);
|
|
325
|
+
},
|
|
326
|
+
handle_min(next = true) {
|
|
327
|
+
if (this.min > 59) {
|
|
328
|
+
this.min = 59;
|
|
329
|
+
}
|
|
330
|
+
this.show = "mins";
|
|
331
|
+
|
|
332
|
+
setTimeout(() => {
|
|
333
|
+
this.setup_min();
|
|
334
|
+
this.min && this.set(this.min, next);
|
|
335
|
+
}, 10);
|
|
336
|
+
},
|
|
337
|
+
handle_sec(next = true) {
|
|
338
|
+
if (this.sec > 59) {
|
|
339
|
+
this.sec = 59;
|
|
340
|
+
}
|
|
341
|
+
this.show = "seconds";
|
|
342
|
+
setTimeout(() => {
|
|
343
|
+
this.setup_min();
|
|
344
|
+
this.sec && this.set(this.sec, next);
|
|
345
|
+
}, 10);
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
set(h, next = true) {
|
|
349
|
+
h = parseInt(h);
|
|
350
|
+
const circle = this.$refs.circle;
|
|
351
|
+
const cl = this.$refs["number" + h];
|
|
352
|
+
const hand = this.$refs.hand;
|
|
353
|
+
const clock = this.$refs.clock.getBoundingClientRect();
|
|
354
|
+
|
|
355
|
+
const b = cl.getBoundingClientRect();
|
|
356
|
+
circle.style.top = parseInt(cl.style.top) + 10 + "px";
|
|
357
|
+
circle.style.left = parseInt(cl.style.left) + 10 + "px";
|
|
358
|
+
|
|
359
|
+
let ang = this.angle(
|
|
360
|
+
b.left + 10,
|
|
361
|
+
b.top + 10,
|
|
362
|
+
clock.width / 2 + clock.left,
|
|
363
|
+
clock.top,
|
|
364
|
+
clock.width / 2 + clock.left,
|
|
365
|
+
clock.height / 2 + clock.top
|
|
366
|
+
);
|
|
367
|
+
if (
|
|
368
|
+
(this.show === "hours24" || this.show === "hours12") &&
|
|
369
|
+
((h > 6 && h < 13) || (h > 18 && h <= 23))
|
|
370
|
+
) {
|
|
371
|
+
ang = 180 + 180 - ang;
|
|
372
|
+
} else if (h > 30) {
|
|
373
|
+
ang = 180 + 180 - ang;
|
|
374
|
+
}
|
|
375
|
+
hand.style.transform = "rotate(" + ang + "deg)";
|
|
624
376
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
377
|
+
if (this.show === "hours24" && (h === 0 || h >= 13)) {
|
|
378
|
+
hand.style.height = "60px";
|
|
379
|
+
} else {
|
|
380
|
+
hand.style.height = "100px";
|
|
381
|
+
}
|
|
628
382
|
|
|
629
|
-
|
|
630
|
-
|
|
383
|
+
if (!next) {
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
if (this.show === "hours24") {
|
|
387
|
+
this.show = "mins";
|
|
388
|
+
this.hour = h;
|
|
389
|
+
setTimeout(() => {
|
|
390
|
+
this.setup_min();
|
|
391
|
+
}, 10);
|
|
392
|
+
} else if (this.show === "hours12") {
|
|
393
|
+
this.show = "mins";
|
|
394
|
+
setTimeout(() => {
|
|
395
|
+
this.setup_min();
|
|
396
|
+
}, 10);
|
|
397
|
+
this.hour = h;
|
|
398
|
+
} else if (this.show === "mins") {
|
|
399
|
+
this.min = h;
|
|
400
|
+
if ([0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55].includes(h)) {
|
|
401
|
+
this.isSmall = false;
|
|
402
|
+
this.isHand = false;
|
|
403
|
+
} else {
|
|
404
|
+
this.isSmall = true;
|
|
405
|
+
this.isHand = true;
|
|
631
406
|
}
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
407
|
+
if (this.withSec) {
|
|
408
|
+
this.show = "seconds";
|
|
409
|
+
setTimeout(() => {
|
|
410
|
+
this.setup_min();
|
|
411
|
+
}, 10);
|
|
637
412
|
}
|
|
638
|
-
|
|
639
|
-
.
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
413
|
+
} else {
|
|
414
|
+
this.sec = h;
|
|
415
|
+
}
|
|
416
|
+
this.emit();
|
|
417
|
+
},
|
|
418
|
+
angle(p1x, p1y, p2x, p2y, p3x, p3y) {
|
|
419
|
+
let p0c = Math.sqrt(Math.pow(p3x - p1x, 2) + Math.pow(p3y - p1y, 2));
|
|
420
|
+
let p1c = Math.sqrt(Math.pow(p3x - p2x, 2) + Math.pow(p3y - p2y, 2));
|
|
421
|
+
let p0p1 = Math.sqrt(Math.pow(p2x - p1x, 2) + Math.pow(p2y - p1y, 2));
|
|
422
|
+
return (
|
|
423
|
+
Math.acos((p1c * p1c + p0c * p0c - p0p1 * p0p1) / (2 * p1c * p0c)) *
|
|
424
|
+
(180 / Math.PI)
|
|
425
|
+
);
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
movePointAtAngle(point, angle, distance) {
|
|
429
|
+
return [
|
|
430
|
+
point[0] + Math.sin(angle) * distance,
|
|
431
|
+
point[1] - Math.cos(angle) * distance
|
|
432
|
+
];
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
print_point(n, lng, nums = 12) {
|
|
436
|
+
return this.movePointAtAngle([130, 130], ((Math.PI * 2) / nums) * n, lng);
|
|
437
|
+
},
|
|
438
|
+
setup_hour() {
|
|
439
|
+
let cl = null;
|
|
440
|
+
let po = null;
|
|
441
|
+
for (let i = 1; i <= 12; i++) {
|
|
442
|
+
cl = this.$refs["number" + i];
|
|
443
|
+
po = this.print_point(i, 110);
|
|
444
|
+
cl.style.left = po[0] - 10 + "px";
|
|
445
|
+
cl.style.top = po[1] - 10 + "px";
|
|
446
|
+
cl.classList.add('number-show')
|
|
447
|
+
}
|
|
448
|
+
if (this.is24Hour) {
|
|
449
|
+
for (let i = 13; i <= 23; i++) {
|
|
450
|
+
cl = this.$refs["number" + i];
|
|
451
|
+
po = this.print_point(i, 70);
|
|
452
|
+
cl.style.left = po[0] - 10 + "px";
|
|
453
|
+
cl.style.top = po[1] - 10 + "px";
|
|
454
|
+
cl.classList.add('number-show')
|
|
646
455
|
}
|
|
647
|
-
|
|
456
|
+
cl = this.$refs["number0"];
|
|
457
|
+
po = this.print_point(0, 70);
|
|
458
|
+
cl.style.left = po[0] - 10 + "px";
|
|
459
|
+
cl.style.top = po[1] - 10 + "px";
|
|
460
|
+
cl.classList.add('number-show')
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
setup_min() {
|
|
464
|
+
const circle = this.$refs.circle;
|
|
465
|
+
circle.style.left = "130px";
|
|
466
|
+
circle.style.top = "20px";
|
|
467
|
+
|
|
468
|
+
const clock = this.$refs.hand;
|
|
469
|
+
clock.style.transform = "rotate(0)";
|
|
470
|
+
clock.style.height = "100px";
|
|
471
|
+
|
|
472
|
+
let cl = null;
|
|
473
|
+
let po = null;
|
|
474
|
+
for (let i = 0; i <= 59; i++) {
|
|
475
|
+
cl = this.$refs["number" + i];
|
|
476
|
+
po = this.print_point(i, 110, 60);
|
|
477
|
+
cl.style.left = po[0] - 10 + "px";
|
|
478
|
+
cl.style.top = po[1] - 10 + "px";
|
|
479
|
+
cl.classList.add('number-show')
|
|
480
|
+
}
|
|
648
481
|
}
|
|
482
|
+
}
|
|
483
|
+
};
|
|
484
|
+
</script>
|
|
485
|
+
|
|
486
|
+
<style lang="scss">
|
|
487
|
+
@import "../../../style/include";
|
|
488
|
+
|
|
489
|
+
.#{$prefix}timepicker-clock {
|
|
490
|
+
|
|
491
|
+
--color-timepicker: var(--color-one);
|
|
492
|
+
|
|
493
|
+
.text-time {
|
|
494
|
+
display: flex;
|
|
495
|
+
justify-content: center;
|
|
496
|
+
align-content: center;
|
|
497
|
+
margin-top: 40px;
|
|
498
|
+
width: 260px;
|
|
499
|
+
height: 60px;
|
|
500
|
+
color: #818181;
|
|
501
|
+
font-size: 30px;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.text-time > .time-show {
|
|
505
|
+
background-color: #e0e0e0;
|
|
506
|
+
width: 60px;
|
|
507
|
+
text-align: center;
|
|
508
|
+
border-radius: 10px;
|
|
509
|
+
padding-top: 10px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.text-meridiem {
|
|
513
|
+
display: flex;
|
|
514
|
+
justify-content: space-between;
|
|
515
|
+
width: 260px;
|
|
516
|
+
height: 40px;
|
|
517
|
+
color: #818181;
|
|
518
|
+
font-size: 16px;
|
|
519
|
+
margin-top: -20px;
|
|
520
|
+
padding: 20px;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.meridiem-active {
|
|
524
|
+
background-color: var(--color-timepicker);
|
|
525
|
+
color: #fff;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
.text-meridiem > .time-meridiem {
|
|
529
|
+
width: 40px;
|
|
530
|
+
height: 40px;
|
|
531
|
+
text-align: center;
|
|
532
|
+
border-radius: 10px;
|
|
533
|
+
padding: 12px 5px 5px 5px;
|
|
534
|
+
border: 1px solid #e0e0e0;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.text-time > .t-text {
|
|
538
|
+
text-align: center;
|
|
539
|
+
padding: 20px 5px 0 5px;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
.time-selected {
|
|
543
|
+
color: #141414;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
.clock {
|
|
547
|
+
width: 260px;
|
|
548
|
+
height: 260px;
|
|
549
|
+
background: #e0e0e0;
|
|
550
|
+
border-radius: 50%;
|
|
551
|
+
position: relative;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.clock > .number:hover {
|
|
555
|
+
cursor: pointer;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.clock > .number {
|
|
559
|
+
position: absolute;
|
|
560
|
+
width: 20px;
|
|
561
|
+
height: 20px;
|
|
562
|
+
font-size: 15px;
|
|
563
|
+
font-weight: 600;
|
|
564
|
+
transform-origin: left top;
|
|
565
|
+
text-align: center;
|
|
566
|
+
z-index: 20;
|
|
567
|
+
white-space: nowrap;
|
|
568
|
+
opacity: 0;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.number-show {
|
|
572
|
+
opacity: 1 !important;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.clock > .clock-item-hand {
|
|
576
|
+
width: 2px;
|
|
577
|
+
height: 110px;
|
|
578
|
+
bottom: 130px;
|
|
579
|
+
left: 129px;
|
|
580
|
+
position: absolute;
|
|
581
|
+
z-index: 10;
|
|
582
|
+
background-color: var(--color-timepicker);
|
|
583
|
+
border: 1px solid var(--color-timepicker);
|
|
584
|
+
border-top-left-radius: 10px;
|
|
585
|
+
border-top-right-radius: 10px;
|
|
586
|
+
transform-origin: bottom;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.clock > .clock-item {
|
|
590
|
+
position: absolute;
|
|
591
|
+
bottom: 50%;
|
|
592
|
+
left: 50%;
|
|
593
|
+
background-color: black;
|
|
594
|
+
border: 1px solid white;
|
|
595
|
+
border-top-left-radius: 10px;
|
|
596
|
+
border-top-right-radius: 10px;
|
|
597
|
+
transform-origin: bottom;
|
|
598
|
+
z-index: 10;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
.clock .center {
|
|
602
|
+
position: absolute;
|
|
603
|
+
background-color: var(--color-timepicker);
|
|
604
|
+
z-index: 11;
|
|
605
|
+
width: 10px;
|
|
606
|
+
height: 10px;
|
|
607
|
+
top: 125px;
|
|
608
|
+
left: 125px;
|
|
609
|
+
border-radius: 50%;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.clock .circle {
|
|
613
|
+
position: absolute;
|
|
614
|
+
z-index: 11;
|
|
615
|
+
width: 35px;
|
|
616
|
+
height: 35px;
|
|
617
|
+
top: 20px;
|
|
618
|
+
left: 130px;
|
|
619
|
+
border-radius: 50%;
|
|
620
|
+
color: var(--color-timepicker);
|
|
621
|
+
background-color: var(--color-timepicker);
|
|
622
|
+
border: 2px solid;
|
|
623
|
+
transform: translate(-50%, -50%);
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.time-active {
|
|
627
|
+
color: var(--color-timepicker);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
.clock > .number:hover {
|
|
631
|
+
color: white;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.time-meridiem:hover {
|
|
635
|
+
cursor: pointer;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.clock > .clock-item.hour {
|
|
639
|
+
width: 4px;
|
|
640
|
+
height: 36%;
|
|
641
|
+
background-color: var(--color-timepicker);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.is-small {
|
|
645
|
+
width: 12px !important;
|
|
646
|
+
height: 12px !important;
|
|
647
|
+
border-radius: 50% !important;
|
|
648
|
+
border: 2px solid;
|
|
649
|
+
background-color: unset !important;
|
|
650
|
+
transform: translate(-50%, -50%) !important;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
.number-disabled {
|
|
654
|
+
pointer-events: none;
|
|
655
|
+
color: var(--color-disabled)
|
|
656
|
+
}
|
|
657
|
+
}
|
|
649
658
|
</style>
|