<template>
  <div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'VnPortal',
  props: {
    place: String
  },
  mounted () {
    this.placeEl = this.$state.layout.$refs[this.place]
    this.placeEl.appendChild(this.$el)
  },
  beforeDestroy () {
    this.placeEl.removeChild(this.$el)
  }
}
</script>
