移风店大屏前端
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.

61 lines
1.4 KiB

<!--
* @Author: mk 2403457699@qq.com
* @Date: 2024-01-15 10:07:45
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2024-02-27 15:10:40
* @Description: 介绍一下改动了什么
1 year ago
*
*
-->
2 years ago
<template>
<div style="width: 100%; height: 100%;">
<div class='bg_img'>
<iframe src="https://quanjingtong.cn/t/h3qde4mz8ly" frameborder="no" width="100%" height="100%" id="myIframe">
</iframe>
2 years ago
</div>
</div>
2 years ago
</template>
<script>
export default {
data() {
1 year ago
return {}
},
created() { },
mounted() {
this.editIframeStyle()
},
methods: {
editIframeStyle() {
var iframeDocument = document.getElementById('myIframe').contentWindow.document;
console.log(iframeDocument,'seee');
// 获取目标元素集合
var elements = iframeDocument.getElementsByClassName('vrModal-inner');
console.log(elements,'elements');
// 确保元素存在,并修改第一个匹配元素的样式
if (elements.length > 0) {
var element = elements[0];
element.style.width = "50%"; // 修改宽度
element.style.height = "50%"; // 修改高度
}
}
},
1 year ago
components: {},
computed: {},
watch: {}
2 years ago
}
</script>
<style lang="scss" scoped>
2 years ago
.bg_img {
// background: url('~@/assets/images/map/hsyf.jpg');
// background-size: 100% 100%;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
2 years ago
}
1 year ago
</style>