wave-ui 1.51.0 → 1.51.1
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/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
transition(name="fade" appear @after-leave="
|
|
2
|
+
transition(name="fade" appear @after-leave="onClosed")
|
|
3
3
|
.w-overlay(
|
|
4
|
-
v-if="
|
|
4
|
+
v-if="showOverlay"
|
|
5
|
+
v-show="value"
|
|
5
6
|
:style="(value && styles) || null"
|
|
6
7
|
@keydown.escape.stop="onClick"
|
|
7
8
|
@click="onClick"
|
|
@@ -27,7 +28,8 @@ export default {
|
|
|
27
28
|
emits: ['input', 'update:modelValue', 'click', 'close', 'closed'],
|
|
28
29
|
|
|
29
30
|
data: () => ({
|
|
30
|
-
persistentAnimate: false
|
|
31
|
+
persistentAnimate: false,
|
|
32
|
+
showOverlay: false
|
|
31
33
|
}),
|
|
32
34
|
|
|
33
35
|
computed: {
|
|
@@ -64,6 +66,25 @@ export default {
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
this.$emit('click', e)
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
// Wait until the end of the closing transition to unmount the components it contains.
|
|
72
|
+
// This way, in case of w-select in w-dialog, the w-select will only remove its activator
|
|
73
|
+
// element from the DOM once the dialog is completely closed.
|
|
74
|
+
// https://github.com/antoniandre/wave-ui/issues/82
|
|
75
|
+
onClosed () {
|
|
76
|
+
this.showOverlay = false
|
|
77
|
+
this.$emit('closed')
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
created () {
|
|
82
|
+
this.showOverlay = this.value
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
watch: {
|
|
86
|
+
value (bool) {
|
|
87
|
+
if (bool) this.showOverlay = true
|
|
67
88
|
}
|
|
68
89
|
}
|
|
69
90
|
}
|
|
@@ -341,10 +341,7 @@ export default {
|
|
|
341
341
|
if (this.value && this.activator) this.toggle({ type: 'click', target: this.activatorEl })
|
|
342
342
|
},
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
// of the animation before removing the activator element.
|
|
346
|
-
// https://github.com/antoniandre/wave-ui/issues/82
|
|
347
|
-
destroy () {
|
|
344
|
+
beforeDestroy () {
|
|
348
345
|
this.close()
|
|
349
346
|
|
|
350
347
|
this.removeFromDOM()
|