mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-23 23:51:25 +00:00
Move modal into a portal, just because we can
This commit is contained in:
@@ -17,6 +17,8 @@
|
|||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
</template>
|
</template>
|
||||||
</suspense>
|
</suspense>
|
||||||
|
|
||||||
|
<div id="modal-portal"></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -18,11 +18,13 @@
|
|||||||
<td class="date">{{format(new Date(email.sentDate), 'MMM do yyyy')}}</td>
|
<td class="date">{{format(new Date(email.sentDate), 'MMM do yyyy')}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
|
||||||
|
|
||||||
<ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}">
|
<portal target="#modal-portal">
|
||||||
<MailView :email="openedEmail" />
|
<ModalView :isOpened="!!openedEmail" :closeModal="() => {openedEmail = null;}">
|
||||||
</ModalView>
|
<MailView :email="openedEmail" />
|
||||||
|
</ModalView>
|
||||||
|
</portal>
|
||||||
|
</table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user