showPrint.vue 668 Bytes
Newer Older
wangcong committed
1 2
<template>
  <div>
qiaoyanqi committed
3
	<iframe :src="pdfUrl" frameborder="0" title="print" name="print" style="width: 100%; height: calc(100vh - 50px)"></iframe>
wangcong committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
	<div class="btn">
		<Button @click="handleCancel" class="btnInner">关闭</Button>
	</div>
  </div>
</template>
<script>
export default {
  props: {},
  data() {
    return {
      pdfUrl:''
    }
  },
  watch: {
  },
  methods: {
    handleCancel(){
      window.close();
    }
  },
  mounted() {
	this.pdfUrl=this.$route.query.src;
  },
}
</script>
<style scoped lang="less">
.btn{
  position:fixed;
  bottom:0px;
  right:0px;
  height:50px;
  left:0;
}
.btnInner{
	position:absolute;
	right:20px;
	bottom:10px
}
</style>