Skip to content

Commit e5f4253

Browse files
youaresofunnypi0
authored andcommitted
modal: change event order (#454)
* modal: change event order * modal: change to BS4 events
1 parent 8090c4c commit e5f4253

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/components/modal.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@
188188
if (this.is_visible) {
189189
return;
190190
}
191+
this.$emit('show');
191192
this.is_visible = true;
192193
this.$root.$emit('shown::modal', this.id);
193194
this.body.classList.add('modal-open');
@@ -216,7 +217,7 @@
216217
217218
// Emit events
218219
this.$emit('change', false);
219-
this.$emit('hidden', e);
220+
this.$emit('hide',e);
220221
221222
if (isOK === true) {
222223
this.$emit('ok', e);
@@ -234,6 +235,7 @@
234235
}
235236
this.is_visible = false;
236237
this.$root.$emit('hidden::modal', this.id);
238+
this.$emit('hidden', e);
237239
this.body.classList.remove('modal-open');
238240
}
239241
},

0 commit comments

Comments
 (0)