<template>
  <Teleport
    v-if="isMounted"
    v-bind="$attrs"
  >
    <slot />
  </Teleport>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'VcMountedTeleport',
  data () {
    return {
      isMounted: false
    }
  },
  mounted () {
    this.isMounted = true
  }
})

</script>
