随笔分类 - iframe
摘要:第一种方式通过 iframe 在线预览 pdf,word,excel,ppt,txt,图片,视频 <template> <el-button @click="openHandler">预览</el-button> <el-dialog @close="closeHandler" v-model="m
阅读全文
摘要:父页面通过ifarame传递参数 有些时候,我们需要在嵌套页面。 我们就需要使用iframe了。 通过iframe传递参数给子页面。 需求描述,当我们点击按钮的时候。 传递参数给子页面。子页面接受后展示出来。 我们使用postMessage() 方法用于安全地实现跨源通信。 otherWindow.
阅读全文
摘要:iframe 嵌套第三方页面出现的问题 我们需要通过一个接口获取被嵌套的地址。 然后将改地址赋值给iframe的src中,代码如下 <template> <div> <iframe :src="httpIframeUrl" class="whiframe" scrolling="yes" ></if
阅读全文