@afeefa/vue-app 0.0.163 → 0.0.165
Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.165
|
package/package.json
CHANGED
@@ -85,12 +85,21 @@ export default class ATimePicker extends Vue {
|
|
85
85
|
|
86
86
|
created () {
|
87
87
|
this.currentDate = new Date(this.value)
|
88
|
+
|
88
89
|
this.initHourAndMinutes()
|
89
90
|
}
|
90
91
|
|
91
92
|
@Watch('value')
|
92
93
|
valueChanged () {
|
93
|
-
|
94
|
+
let date = new Date(this.value)
|
95
|
+
if (this.currentHour) {
|
96
|
+
date = moment(date).hours(this.currentHour).toDate()
|
97
|
+
}
|
98
|
+
if (this.currentMinutes) {
|
99
|
+
date = moment(date).minutes(this.currentMinutes).toDate()
|
100
|
+
}
|
101
|
+
this.currentDate = date
|
102
|
+
|
94
103
|
this.initHourAndMinutes()
|
95
104
|
}
|
96
105
|
|
@@ -71,16 +71,22 @@ export default class FlyingContextContainer extends Vue {
|
|
71
71
|
}
|
72
72
|
}
|
73
73
|
|
74
|
-
domChanged () {
|
74
|
+
domChanged ([...mutationRecords]) {
|
75
75
|
const container = this.getChildrenContainer()
|
76
|
+
|
76
77
|
this.visible = !!container.children.length
|
78
|
+
const isOpening = mutationRecords.length === 1 && mutationRecords[0].addedNodes.length === 1 // only 1 record ... and this one is 'added'
|
79
|
+
console.log(mutationRecords)
|
77
80
|
|
78
81
|
const el = document.documentElement
|
79
82
|
|
80
|
-
if (
|
83
|
+
if (isOpening) {
|
81
84
|
const style = getComputedStyle(el)
|
82
85
|
this.oldOverflowY = style.overflowY
|
83
86
|
this.lastScrollbarWidth = this.getScrollbarWidth()
|
87
|
+
}
|
88
|
+
|
89
|
+
if (this.visible) {
|
84
90
|
setTimeout(() => {
|
85
91
|
el.style.overflowY = 'hidden'
|
86
92
|
el.style.marginRight = this.lastScrollbarWidth + 'px'
|