<template>
  <div v-if="show" class="toastComDiv">
    <div class="toastComDivInner"> {{text}}</div>
  
  </div>
</template>

<script>

export default {
  props: ['buttonStyle','button', 'title','disabled'],
  data() {
    return {
        text:''
    };
  },
  // 父beforeCreated ->父created ->父beforeMounted ->子beforeCreated ->子created ->子beforeMounted ->子mounted -> 父mounted
  created(){},
  mounted() {
       var that = this
      //  let actStatus = sessionStorage.getItem('actStatus');
      //  console.log(actStatus,2222222222222222)
      //  if(actStatus == 1){
      //      console.log('活动尚未开始toast')
      //      this.text = '活动尚未开始'
      //      setTimeout(function(){
      //       that.submit()
      //      }, 1500);
      //  }else if((actStatus == 2)){
      //       console.log('活动已结束toast')
      //      this.text = '活动已结束'
      //      setTimeout(function(){
      //       that.submit()
      //      }, 1500);
      //  }
      this.text = this.message
      setTimeout(function(){
            that.submit()
           }, 1500);
  },
  methods: {
  
  }
};
</script>

<style lang="scss">
.toastComDiv{
     position: fixed;
    z-index: 10000;
    width: 100%;
    height: 100%;
    top:0;
    left: 0;
    bottom:0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toastComDivInner{
    opacity: 0.63;
    background: #000000;
    border-radius: .4rem;
    display: inline-block;
    color: #FFFFFF;
     font-size: .3rem;
    line-height: .6rem;
    max-width: 75%;
    padding: 0 10px;
}
</style>
