@veritree/ui 0.53.0 → 0.54.0
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
|
@@ -42,14 +42,11 @@ export default {
|
|
|
42
42
|
this.overlay = overlay;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
const hide = () => this.hide();
|
|
46
|
-
|
|
47
|
-
const emit = () => this.emit();
|
|
48
|
-
|
|
49
45
|
return {
|
|
50
46
|
componentId,
|
|
51
|
-
hide,
|
|
52
|
-
|
|
47
|
+
hide: this.hide,
|
|
48
|
+
emitHidden: this.emitHidden,
|
|
49
|
+
emitShown: this.emitShown,
|
|
53
50
|
registerContent,
|
|
54
51
|
registerOverlay,
|
|
55
52
|
full: this.full,
|
|
@@ -125,13 +122,19 @@ export default {
|
|
|
125
122
|
if (this.hasContent) this.content.hide();
|
|
126
123
|
},
|
|
127
124
|
|
|
128
|
-
|
|
125
|
+
emitHidden() {
|
|
129
126
|
this.$nextTick(() => {
|
|
130
127
|
this.$emit('input', false);
|
|
131
128
|
this.$emit('hidden');
|
|
132
129
|
});
|
|
133
130
|
},
|
|
134
131
|
|
|
132
|
+
emitShown() {
|
|
133
|
+
this.$nextTick(() => {
|
|
134
|
+
this.$emit('shown');
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
|
|
135
138
|
/**
|
|
136
139
|
* Hides the dialog when clicking outside its content.
|
|
137
140
|
*
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
leave-active-class="duration-300 ease-out"
|
|
7
7
|
leave-class="translate-y-0 opacity-100"
|
|
8
8
|
leave-to-class="translate-y-[50px] opacity-0"
|
|
9
|
+
@after-enter="showDialog"
|
|
9
10
|
@after-leave="hideDialog"
|
|
10
11
|
>
|
|
11
12
|
<div
|
|
@@ -83,7 +84,11 @@ export default {
|
|
|
83
84
|
},
|
|
84
85
|
|
|
85
86
|
hideDialog() {
|
|
86
|
-
this.apiDialog().
|
|
87
|
+
this.apiDialog().emitHidden();
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
showDialog() {
|
|
91
|
+
this.apiDialog().emitShown();
|
|
87
92
|
},
|
|
88
93
|
},
|
|
89
94
|
};
|