Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

Commit cf70767

Browse files
authored
Update Teleport.vue (#139)
1 parent e5852cd commit cf70767

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

lib/Components/Teleport.vue

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<template>
2-
<Teleport
3-
v-if="isMounted"
2+
<component
3+
:is="isMounted ? Teleport : 'div'"
4+
v-show="isMounted"
45
v-bind="$attrs"
56
>
67
<slot />
7-
</Teleport>
8+
</component>
89
</template>
910

1011
<script>
12+
import { Teleport } from "vue";
13+
1114
export default {
15+
inheritAttrs: false,
16+
1217
data() {
1318
return {
14-
isMounted: false
19+
isMounted: false,
20+
Teleport
1521
};
1622
},
1723

0 commit comments

Comments
 (0)