<!--  -->
<template>
  <div class="iframe-view">
    <div class="title">{{ iframeData.name }}</div>
    <div class="iframe-box" v-if="iframeData.modelUrl">
      <iframe :src="iframeData.modelUrl" frameborder="0"></iframe>
    </div>
    <p class="support">四维时代提供技术支持</p>
    <div class="close-btn" @click="close">关闭</div>
  </div>
</template>

<script setup>
import { reactive, ref, toRefs, onBeforeMount, onMounted, defineEmits, defineProps } from "vue";
const props = defineProps(["iframeData"]);
const emits = defineEmits(["close"]);

const close = () => {
  emits("close");
};
</script>
<style lang="scss" scoped>
.iframe-view {
  width: 100vw;
  height: 100vh;
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  .iframe-box {
    width: 100%;
    height: 100%;
    iframe {
      width: 100%;
      height: 100%;
    }
  }
  .title {
    margin-top: 55px;
    position: absolute;
    width: 310px;
    height: 60px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    font-size: 0.64rem;
    color: #fff;
    text-align: center;
  }
  .support {
    position: absolute;
    z-index: 1;
    font-size: 16px;
    color: #17181d;
    font-weight: 100;
    left: 50%;
    transform: translateX(-50%);
    bottom: 13vh;
    letter-spacing: 1px;
    text-shadow: rgb(51 51 51) 0 1px 1px;
  }
  .close-btn {
    position: absolute;
    bottom: 5%;
    right: 50%;
    transform: translateX(50%);
    width: 58px;
    height: 58px;
    color: #fff;
    font-size: 20px;
    z-index: 999999999;
  }
}
</style>
