<template>
  <div id="framediv">
     <slot  :adjustHeight="frameHeight"></slot>
  </div>
</template>
  <script>
export default {
  name: "pagespace_page",
  prop:{
     tweak:Number
  },
  data() {
    return {
       frameHeight:0,
       advalue:this.tweak?this.tweak:0
    };
  },
  components: {
    
  },
  mounted(){
    this.setHeight();
    $(window).resize(()=>{
      this.setHeight()
    })
  },
  methods: {
    setHeight(){
      this.$nextTick(()=>{
         let $framediv = $("#framediv");
      let el = $framediv.get()[0];
      let h = window.innerHeight - el.offsetTop-this.advalue;
      this.frameHeight=h
        this.$emit("sizechange",this.frameHeight)
      })
    
    }
  }
};
</script>
  <style>
</style>
