<template>
  <div class="small-big" @click="$emit('update:isSmallImgShow',false)">
    <img @click.stop="" :src="url"  alt="">
  </div>
</template>

<script>
import {getPreviewImg, loadIframeDmContent} from "@/service/show-platform";

export default {
  name: "SmallBig",
  props:{
    src:{

    },
    isSmallImgShow:{

    }
  },
  data(){
    return {
      url: null
    }
  },
  mounted() {
    debugger
    getPreviewImg({
      url:this.src
    }).then(async res => {
      const blob = new Blob([res], { type: "image/png" });
      // 创建URL对象
      this.url = URL.createObjectURL(blob);
    })
  }
}
</script>

<style scoped lang="scss">
.small-big{
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left:0;
  right: 0;
  top: 0;
  z-index: 999;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  img{
    width: 80%;
  }
}
</style>
