专业网站建设品牌,十四年专业建站经验,服务6000+客户--广州京杭网络
免费热线:400-683-0016      微信咨询  |  联系我们

iframe能嵌入网址吗_CSS学习

当前位置:网站建设 > 技术支持
资料来源:网络整理       时间:2023/3/4 5:31:37       共计:3606 浏览

iframe能嵌入网址吗?

可以的,

代码示例:

<template>

<div id="app">

<iframe

style="border:none"

:width="searchTableWidth"

:height="searchTableHeight"

v-bind:src="reportUrl"

></iframe>

</div>

</template>

<script>

import Vue from 'vue'

export default {

methods: {

widthHeight() {

this.searchTableHeight = window.innerHeight -146;

this.searchTableWidth = window.innerWidth - 280

},

},

data() {

return {

reportUrl: '',

searchTableHeight: 0,

searchTableWidth: 0

}

},

mounted() {

window.onresize = () => {

this.widthHeight(); // 自适应高宽度

};

this.$nextTick(function () {

this.widthHeight();

});

},

created() {

// 从路由里动态获取 url地址 具体地址看libs下util.js里的 backendMenuToRoute 方法

this.reportUrl = this.$route.meta.pathUrl

},

watch: {

'$route': function () {

// 监听路由变化

this.reportUrl = this.$route.meta.pathUrl

}

}

}

</script>

版权说明:
本网站凡注明“广州京杭 原创”的皆为本站原创文章,如需转载请注明出处!
本网转载皆注明出处,遵循行业规范,如发现作品内容版权或其它问题的,请与我们联系处理!
欢迎扫描右侧微信二维码与我们联系。
·上一条:从日本汇日元回中国_CSS学习 | ·下一条:html怎么创建可添加数据的表_CSS学习

Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有    粤ICP备16019765号 

广州京杭网络科技有限公司 版权所有