@afeefa/vue-app 0.0.212 → 0.0.214
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.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.214
|
package/package.json
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
dense
|
16
16
|
outlined
|
17
17
|
hide-details
|
18
|
+
:error-messages="error ? ['error'] : []"
|
18
19
|
@wheel.prevent="onWheelHour"
|
19
20
|
@focus="focusHour = true"
|
20
21
|
@blur="updateHoursAndMinute"
|
@@ -49,6 +50,7 @@
|
|
49
50
|
dense
|
50
51
|
outlined
|
51
52
|
hide-details
|
53
|
+
:error-messages="error ? ['error'] : []"
|
52
54
|
@wheel.prevent="onWheelMinute"
|
53
55
|
@focus="focusMinute = true"
|
54
56
|
@blur="updateHoursAndMinute"
|
@@ -73,7 +75,7 @@ import formatHour from '@a-vue/utils/format-hour'
|
|
73
75
|
import formatMinutes from '@a-vue/utils/format-minutes'
|
74
76
|
|
75
77
|
@Component({
|
76
|
-
props: ['value']
|
78
|
+
props: ['value', {error: false}]
|
77
79
|
})
|
78
80
|
export default class ATimePicker extends Vue {
|
79
81
|
currentDate = null
|
@@ -91,14 +93,12 @@ export default class ATimePicker extends Vue {
|
|
91
93
|
|
92
94
|
@Watch('value')
|
93
95
|
valueChanged () {
|
94
|
-
|
95
|
-
if (this.
|
96
|
-
|
97
|
-
}
|
98
|
-
if (this.currentMinutes) {
|
99
|
-
date = moment(date).minutes(this.currentMinutes).toDate()
|
96
|
+
// filter out inner changes loop
|
97
|
+
if (this.value.getTime() === this.currentDate.getTime()) {
|
98
|
+
return
|
100
99
|
}
|
101
|
-
|
100
|
+
|
101
|
+
this.currentDate = this.value
|
102
102
|
|
103
103
|
this.initHourAndMinutes()
|
104
104
|
}
|
@@ -216,12 +216,17 @@ export default class ATimePicker extends Vue {
|
|
216
216
|
}
|
217
217
|
}
|
218
218
|
|
219
|
+
::v-deep() svg {
|
220
|
+
width: 28px;
|
221
|
+
height: 28px;
|
222
|
+
}
|
223
|
+
|
219
224
|
.up {
|
220
|
-
margin-bottom: -
|
225
|
+
margin-bottom: -5px;
|
221
226
|
}
|
222
227
|
|
223
228
|
.down {
|
224
|
-
margin-top: -
|
229
|
+
margin-top: -7px;
|
225
230
|
}
|
226
231
|
|
227
232
|
.hourMinutesSeparator {
|
@@ -1,40 +1,12 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
:
|
6
|
-
:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
max-width="290px"
|
11
|
-
min-width="290px"
|
12
|
-
>
|
13
|
-
<template #activator="{ on, attrs }">
|
14
|
-
<v-text-field
|
15
|
-
v-model="model[name]"
|
16
|
-
:label="label || name"
|
17
|
-
prepend-icon="mdi-clock-time-four-outline"
|
18
|
-
readonly
|
19
|
-
dense
|
20
|
-
outlined
|
21
|
-
v-bind="attrs"
|
22
|
-
v-on="on"
|
23
|
-
/>
|
24
|
-
</template>
|
25
|
-
<v-time-picker
|
26
|
-
v-if="menu"
|
27
|
-
ref="timePicker"
|
28
|
-
v-model="model[name]"
|
29
|
-
:validator="validator"
|
30
|
-
v-bind="$attrs"
|
31
|
-
full-width
|
32
|
-
scrollable
|
33
|
-
format="24hr"
|
34
|
-
v-on="$listeners"
|
35
|
-
@click:minute="$refs.menu.save(model[name])"
|
36
|
-
/>
|
37
|
-
</v-menu>
|
2
|
+
<a-time-picker
|
3
|
+
v-model="model[name]"
|
4
|
+
class="timePicker"
|
5
|
+
:label="label || name"
|
6
|
+
:validator="validator"
|
7
|
+
v-bind="$attrs"
|
8
|
+
v-on="$listeners"
|
9
|
+
/>
|
38
10
|
</template>
|
39
11
|
|
40
12
|
<script>
|
@@ -43,9 +15,5 @@ import { FormFieldMixin } from '../FormFieldMixin'
|
|
43
15
|
|
44
16
|
@Component
|
45
17
|
export default class FormFieldTime extends Mixins(FormFieldMixin) {
|
46
|
-
menu = false
|
47
|
-
validate () {
|
48
|
-
this.$refs.timePicker.validate()
|
49
|
-
}
|
50
18
|
}
|
51
19
|
</script>
|