自定义APP自定义App数据通讯
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
781 B

2 months ago
<script lang="ts" setup>
import { ElDialog } from 'element-plus';
const props = withDefaults(defineProps<{
url:string,
closeFunc:()=>void, //父级只需销毁组件
}>(),{})
onMounted(()=>{})
</script>
<template>
<el-dialog :model-value="true" :style="{height: '90%',width:'90%'}" v-on:close="closeFunc()">
<template #default>
<iframe id="preivew" width="100%" height="100%" :src="props.url"></iframe>
</template>
</el-dialog>
</template>
<style>
/* dialog的body内容样式设置*/
.el-dialog__body{
height: 96%;
display: flex;
flex-direction: column;
align-items: center;
}
.el-dialog{
/* 让整个弹出窗口位置更高一些*/
--el-dialog-margin-top:7vh;
}
</style>