close modal on esc press
This commit is contained in:
parent
ca38616395
commit
8c759c4f23
1 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="modal" tabindex="-1">
|
<div class="modal" tabindex="-1" @keyup.esc="$emit('close')">
|
||||||
<div class="modal-dialog modal-xl">
|
<div class="modal-dialog modal-xl">
|
||||||
<div class="modal-content bg-dark text-light border-secondary">
|
<div class="modal-content bg-dark text-light border-secondary">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
@ -30,7 +30,10 @@
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'Modal',
|
name: 'Modal',
|
||||||
props: ['title']
|
props: ['title'],
|
||||||
|
mounted() {
|
||||||
|
this.$el.focus();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue