vue如何嵌套iframe链接

前端 潘老师 4个月前 (12-15) 94 ℃ (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),学习愉快哦!


版权声明:本站文章,如无说明,均为本站原创,转载请注明文章来源。如有侵权,请联系博主删除。
本文链接:https://www.panziye.com/front/12565.html
喜欢 (0)
请潘老师喝杯Coffee吧!】
分享 (0)
用户头像
发表我的评论
取消评论
表情 贴图 签到 代码

Hi,您需要填写昵称和邮箱!

  • 昵称【必填】
  • 邮箱【必填】
  • 网址【可选】