<template>
    <popup v-if="show">
      <div class="ui-message ui-message-confirm" style="width: 1280px">
        <div class="ui-message-header">
          <span>{{name||'无标题'}}</span>
          <button class="ui-button submit ui-button-rect" @click="openBlank">新窗口打开</button>
          <span @click="$emit('close')">
            <i class="iconfont icon_close"></i>
          </span>
        </div>
        <div class="ui-message-main">
          <iframe :src="ifr" frameborder="0"></iframe>
        </div>
      </div>
    </popup>
</template>

<script>
import Popup from "@/components/shared/popup";

export default {
  props:['show','ifr','name'],
  components:{
    Popup
  },
  data(){
    return {}
  },
  methods:{
    openBlank(){
          window.open(this.ifr,'_blank')
    }
  }
}
</script>

<style lang="less" scoped>

.ui-button-rect{
  border-radius: 0;
  align-items: center;
  vertical-align: middle;
  color: #202020;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  line-height: 30px;
  height: 30px;
  border: none;
  text-align: center;
}
.ui-message-confirm{
  border-radius: 0;
  border-radius: 4px;
  .icon_close{
    color: #909090;
  }
  .ui-message-header{
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px solid #EBEBEB;
    position: relative;
    height: 50px;
    line-height: 50px;
    .submit{
      position: absolute;
      right: 50px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
  .ui-message-main{
    width: 100%;
    padding: 20px;
    iframe{
      width: 100%;
      height: 80vh;
    }
  }
  .ui-message-footer{
    width: 100%;
    .btn{
      width: 80%;
      display: flex;
      justify-content: center;
      margin: 0 auto;
      .ui-button{
        max-width: 104px
      }
    }

  }
}
</style>
