学到了新知识,
项目中打开弹窗需要展示A项目的页面信息,复制了A项目的代码,却一直没复现出来页面,最后用了iframe,好方便!
//页面引入
<iframe id="cont" :src="url" frameborder="no" style="width: 100%; height: 100%" scrolling="auto" />
//设置宽度高度
mounted () {
document.getElementById("cont").height = 1000 + 'px';
document.getElementById("cont").height = 600 + 'px';
},
//打开弹窗后触方法
openUrl (event) {
this.$nextTick().then(() => {
this.url = "http://A项目网址和参数 ";
})
},