mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
hide overlays by esc shortcut
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div @keydown.esc="closeOverlays" tabindex="-1">
|
||||
<!--UI components-->
|
||||
<Alert />
|
||||
<ToasterWrapper />
|
||||
@@ -72,6 +72,12 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
closeOverlays() {
|
||||
events.$emit('popup:close')
|
||||
events.$emit('popover:close')
|
||||
|
||||
this.$store.commit('CLOSE_NOTIFICATION_CENTER')
|
||||
},
|
||||
spotlightListener(e) {
|
||||
if (e.key === 'k' && e.metaKey || e.key === 'k' && e.ctrlKey) {
|
||||
e.preventDefault()
|
||||
|
||||
@@ -36,6 +36,7 @@ export default {
|
||||
this.isVisible = !this.isVisible
|
||||
}
|
||||
})
|
||||
events.$on('popover:close', () => this.isVisible = false)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user