diff options
| author | taehoon <th.dev91@gmail.com> | 2019-10-18 07:05:01 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-10-18 07:05:01 -0400 |
| commit | 348d6664eb07d4854ad4266873ad423091658187 (patch) | |
| tree | 8f6940c6c0706d3c678777f979c80d4805cf5a6d /src/components/media_modal | |
| parent | 07ec18fe11a347f8cbad6b3e667dfc9d9f09c867 (diff) | |
refactor all kind of modals using the modal component
Diffstat (limited to 'src/components/media_modal')
| -rw-r--r-- | src/components/media_modal/media_modal.js | 4 | ||||
| -rw-r--r-- | src/components/media_modal/media_modal.vue | 13 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/components/media_modal/media_modal.js b/src/components/media_modal/media_modal.js index 992d7129..4832abda 100644 --- a/src/components/media_modal/media_modal.js +++ b/src/components/media_modal/media_modal.js @@ -1,11 +1,13 @@ import StillImage from '../still-image/still-image.vue' import VideoAttachment from '../video_attachment/video_attachment.vue' +import Modal from '../modal/modal.vue' import fileTypeService from '../../services/file_type/file_type.service.js' const MediaModal = { components: { StillImage, - VideoAttachment + VideoAttachment, + Modal }, computed: { showing () { diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 06ced5a1..69e75e2b 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -1,9 +1,8 @@ <template> - <div + <Modal v-if="showing" - v-body-scroll-lock="showing" - class="modal-view media-modal-view" - @click.prevent="hide" + class="media-modal-view" + @close="hide" > <img v-if="type === 'image'" @@ -33,7 +32,7 @@ > <i class="icon-right-open arrow-icon" /> </button> - </div> + </Modal> </template> <script src="./media_modal.js"></script> @@ -44,10 +43,6 @@ .media-modal-view { z-index: 1001; - body:not(.scroll-locked) & { - display: none; - } - &:hover { .modal-view-button-arrow { opacity: 0.75; |
