<template>
  <div >
    <div @click="lookPdf"> <VuePdf   :src="this_window+src"></VuePdf></div>
   
    <!-- <VuePdf @click="lookPdf" v-else  :src="this_window+item.url"></VuePdf> -->
    

      <van-overlay :show="show" @click="onClickHide">
        <div class="imgsty">
          <VuePdf :src="this_window+src"></VuePdf>
        </div>
      </van-overlay>
   
  </div>
</template>
<script>
import VuePdf from 'vue-pdf'

export default {
  name: 'SocAppIndex',
  props: {
    src: {
      type: String,
      default: ''
    }
  },
  components: {
    VuePdf
  },
  data() {
    return {
        show:false,
        this_window:process.env.NODE_ENV === "development"? '/dev':window.origin
    }
  },

  mounted() {},

  methods: {
    //查看pdf
    lookPdf() {
       
      this.show = !this.show
    },

    onClickHide() {
      this.show = false
    }
  }
}
</script>
<style lang="scss" scoped>
.imgsty {
  position: absolute;
  top: 28%;
  width: 100%;
  height: 100%;
}
</style>
