mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-22 15:15:34 +00:00
Modal display and opening
This commit is contained in:
@@ -18,13 +18,16 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<MailView :email="openedEmail" v-if="openedEmail" />
|
<ModalView v-if="openedEmail">
|
||||||
|
<MailView :email="openedEmail" />
|
||||||
|
</ModalView>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { format } from 'date-fns';
|
import { format } from 'date-fns';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import MailView from '@/components/MailView.vue';
|
import MailView from '@/components/MailView.vue';
|
||||||
|
import ModalView from '@/components/ModalView.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
async setup(){
|
async setup(){
|
||||||
@@ -38,7 +41,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
MailView
|
MailView,
|
||||||
|
ModalView
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
unarchivedEmails(){
|
unarchivedEmails(){
|
||||||
|
|||||||
18
src/components/ModalView.vue
Normal file
18
src/components/ModalView.vue
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<template>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="overlay"></div>
|
||||||
|
<div class="modal-card">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user