vue如何嵌套iframe链接

IT 文章1周前更新 小编
0 0 0

本文主要讲解关于vue如何嵌套iframe链接相关内容,让我们来一起学习下吧!

1、未加载完成时显示loading动画
2、可以设置iframe标签的宽高

<div
      v-loading="loading"
      element-loading-text="拼命加载中"
      element-loading-spinner="el-icon-loading"
      element-loading-background="rgba(0, 0, 0, 0.8)"
    >
     <iframe
        ref="iframe"
        id="iframeContain"
        name="iframeContain"
        seamless
        scrolling="yes"
        :src="com"
      />
</div>
iframeLoad() {
      this.loading = true;
      const iframe = this.$refs.iframe;
      // 兼容处理
      if (iframe.attachEvent) {
      // IE
        iframe.attachEvent("onload", () => {
        this.loading = false;
        });
      } else {
         // 非IE
        iframe.onload = () => {
        this.loading = false;
      };
}

以上就是关于vue如何嵌套iframe链接相关的全部内容,希望对你有帮助。欢迎持续关注潘子夜个人博客(www.panziye.com),学习愉快哦![readsource]https://juejin.cn/post/7312611470734524468[/readsource]

ad

程序员导航

优网导航旗下整合全网优质开发资源,一站式IT编程学习与工具大全网站

© 版权声明

相关文章

暂无评论

暂无评论...