Use vue3 teleport instead of portal

This commit is contained in:
Tusooa Zhu 2022-04-06 14:54:58 -04:00 committed by FloatingGhost
parent 97fba09fd2
commit 4984d97379
7 changed files with 14 additions and 14 deletions

View file

@ -59,7 +59,7 @@
</button>
</template>
</Popover>
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmBlock"
:title="$t('user_card.block_confirm_title')"
@ -78,7 +78,7 @@
/>
</i18n>
</confirm-modal>
</portal>
</teleport>
</div>
</template>

View file

@ -167,7 +167,7 @@
</a>
</div>
</div>
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmLogout"
:title="$t('login.logout_confirm_title')"
@ -178,7 +178,7 @@
>
{{ $t('login.logout_confirm') }}
</confirm-modal>
</portal>
</teleport>
</nav>
</template>
<script src="./desktop_nav.js"></script>

View file

@ -125,7 +125,7 @@
icon="ellipsis-h"
/>
</span>
<portal to="modal">
<teleport to="#modal">
<ConfirmModal
v-if="showingDeleteDialog"
:title="$t('status.delete_confirm_title')"
@ -136,7 +136,7 @@
>
{{ $t('status.delete_confirm') }}
</ConfirmModal>
</portal>
</teleport>
</template>
</Popover>
</template>

View file

@ -7,7 +7,7 @@
@click="onClick"
>
{{ label }}
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmUnfollow"
:title="$t('user_card.unfollow_confirm_title')"
@ -26,7 +26,7 @@
/>
</i18n>
</confirm-modal>
</portal>
</teleport>
</button>
</template>

View file

@ -76,7 +76,7 @@
ref="sideDrawer"
:logout="logout"
/>
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmLogout"
:title="$t('login.logout_confirm_title')"
@ -87,7 +87,7 @@
>
{{ $t('login.logout_confirm') }}
</confirm-modal>
</portal>
</teleport>
</div>
</template>

View file

@ -33,7 +33,7 @@
>
{{ status.repeat_num }}
</span>
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmDialog"
:title="$t('status.repeat_confirm_title')"
@ -44,7 +44,7 @@
>
{{ $t('status.repeat_confirm') }}
</confirm-modal>
</portal>
</teleport>
</div>
</template>

View file

@ -295,7 +295,7 @@
:handle-links="true"
/>
</div>
<portal to="modal">
<teleport to="#modal">
<confirm-modal
v-if="showingConfirmMute"
:title="$t('user_card.mute_confirm_title')"
@ -314,7 +314,7 @@
/>
</i18n>
</confirm-modal>
</portal>
</teleport>
</div>
</template>