Skip to content

Commit

Permalink
Merge pull request #4196 from anko9801/fix/file-modal-height
Browse files Browse the repository at this point in the history
ファイルモーダルの上下を押して閉じるように修正
  • Loading branch information
mehm8128 authored Dec 11, 2023
2 parents 9e8f0d6 + 4a1764f commit 98dfbfb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/components/Modal/FileModal/FileModal.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template>
<click-outside stop @click-outside="clearModal">
<div v-if="fileMeta" :class="$style.fileContainer">
<div
v-if="fileMeta"
:class="$style.fileContainer"
:data-fullsize="$boolAttr(isFullsizeModal)"
>
<file-modal-image v-if="fileType === 'image'" :file-id="fileMeta.id" />
<file-modal-video
v-else-if="fileType === 'video'"
Expand Down Expand Up @@ -34,11 +38,17 @@ const fileIdState = reactive({
})
const { fileMeta, fileType } = useFileMeta(fileIdState)
const { clearModal } = useModalStore()
const isFullsizeModal = computed(
() => fileType.value === 'image' || fileType.value === 'video'
)
</script>

<style module lang="scss">
.fileContainer {
height: 100%;
height: auto;
&[data-fullsize] {
height: 100%;
}
display: flex;
flex-direction: column;
align-items: center;
Expand Down

0 comments on commit 98dfbfb

Please sign in to comment.