Escでメディアビューワが閉じれるように (#5494)
* EscやBackspaceでメディアビューワが閉じれるように * Backspaceでは閉じないように
This commit is contained in:
parent
4c6c06c80a
commit
d672bb4643
3 changed files with 17 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="mk-media-video-dialog">
|
||||
<div class="mk-media-video-dialog" v-hotkey.global="keymap">
|
||||
<div class="bg" @click="close"></div>
|
||||
<video :src="video.url" :title="video.name" controls autoplay ref="video" @volumechange="volumechange"/>
|
||||
</div>
|
||||
|
|
@ -22,6 +22,13 @@ export default Vue.extend({
|
|||
if (this.start) videoTag.currentTime = this.start
|
||||
videoTag.volume = this.$store.state.device.mediaVolume;
|
||||
},
|
||||
computed: {
|
||||
keymap(): any {
|
||||
return {
|
||||
'esc': this.close,
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
anime({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue