65 lines
1.2 KiB
Vue

<template>
<div>
<el-dialog
title="查看pdf文件"
:visible="true"
width="1100px"
append-to-body
:close-on-click-modal="false"
@close="handleClose" >
<div class="addContract p-16">
<el-scrollbar class="bor" :style="'height:'+`${contentHeight}`+'px'">
<iframe :src="previewUrl" width="100%" :height="`${contentHeight-5}`+'px'"></iframe>
</el-scrollbar>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="handleClose">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
previewUrl: {
type: String,
default: () => {
return ''
},
},
},
data() {
return {
};
},
computed:{
// 获取抽屉drawer的内容高度
contentHeight(){
let oh = document.documentElement.clientHeight;
return oh-180
},
},
async created() {
},
mounted(){
},
beforeDestroy() {
},
methods: {
handleClose() {
// this.$emit('update:editSealFlag', false)
this.$emit('update:visible', false)
},
}
};
</script>