mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 01:17:16 +00:00
23 lines
454 B
Vue
23 lines
454 B
Vue
|
<template>
|
||
|
<NuxtExampleLayout example="app/teleport">
|
||
|
<div>
|
||
|
<!-- SSR Teleport -->
|
||
|
<Teleport to="body">
|
||
|
SSR Teleport
|
||
|
</Teleport>
|
||
|
|
||
|
<!-- Client Teleport -->
|
||
|
<ClientOnly>
|
||
|
<Teleport to="body">
|
||
|
<div>
|
||
|
Hello from a client-side teleport!
|
||
|
</div>
|
||
|
</Teleport>
|
||
|
</ClientOnly>
|
||
|
|
||
|
<!-- Modal Example -->
|
||
|
<MyModal />
|
||
|
</div>
|
||
|
</NuxtExampleLayout>
|
||
|
</template>
|