vue-friendly-iframe-一个Vue js组件,用于创建超快速加载,无阻塞的iframe


<template>

  <vue-friendly-iframe :src="url" :loading="loading" :error="error" :width="width" :height="height"></vue-friendly-iframe>

</template>


<script>

import VueFriendlyIframe from 'vue-friendly-iframe';


export default {

  components: {

    VueFriendlyIframe

  },

  data() {

    return {

      url: 'https://www.example.com',

      loading: true,

      error: false,

      width: '100%',

      height: '500px'

    }

  }

}

</script>


参考:

安装和使用

https://officert.github.io/vue-friendly-iframe/#/install