Implement image dialog

This commit is contained in:
syuilo
2020-02-16 22:46:18 +09:00
parent dc39caed1e
commit 091923764d
7 changed files with 82 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="mk-modal">
<div class="mk-modal" v-hotkey.global="keymap">
<transition :name="$store.state.device.animation ? 'bg-fade' : ''" appear>
<div class="bg" ref="bg" v-if="show" @click="close()"></div>
</transition>
@ -20,6 +20,13 @@ export default Vue.extend({
show: true,
};
},
computed: {
keymap(): any {
return {
'esc': this.close,
};
},
},
methods: {
close() {
this.show = false;