【问题标题】:add vue-videobg to vuetify (cdn) without webpack在没有 webpack 的情况下将 vue-videobg 添加到 vuetify (cdn)
【发布时间】:2021-11-12 14:36:34
【问题描述】:

我需要在没有"magic_videobg_to_install.java.css.js.htm"的情况下添加 vue-videobg 以在 cdn 中进行 vuetify

<!DOCTYPE html>
<html>
<head>
  <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
<script src="https://unpkg.com/vuetify-video-parallax"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
  <div id="app">
    <v-app>
      <v-main>
        <v-container>Hello world</v-container>

  <v-video-parallax src="http://techslides.com/demos/sample-videos/small.mp4" img="assets/city.png" height="600">
  Some Html Here and the video is <b>normally</b> in the background...
</v-video-parallax>


      </v-main>
    </v-app>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
  <script>
    new Vue({
      el: '#app',
 components: {
    VuetifyVideoParallax: window["vuetify-video-parallax"]
  },
      vuetify: new Vuetify(),
        data() {
         return {
        "important": true,
        "is_video_parallax_work": "no plz help me",
        }
        }
    })
  </script>
</body>
</html>
此代码工作不是视频视差,“[Vue 警告]:未知的自定义元素:-您是否正确注册了组件?对于递归组件,请确保提供“名称”选项。”你能帮助我吗?

【问题讨论】:

    标签: javascript vue.js html5-video vuetify.js


    【解决方案1】:
    add `<script src="https://unpkg.com/vuetify-video-parallax"></script>` after the `vuetify`
    

        
        
    <!DOCTYPE html>
    <html>
    <head>
      <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
      <link href="https://cdn.jsdelivr.net/npm/@mdi/font@6.x/css/materialdesignicons.min.css" rel="stylesheet">
      <link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet">
    
      <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
    </head>
    
    <body>
      <div id="app">
          <template>
            <v-video-parallax 
            :src="src"
            img="http://prcagrimex.co.th/en/wp-content/uploads/2014/04/dummy-image-green-e1398449160839-300x214.jpg"  
            height="600">
                Some Html Here
              </v-video-parallax>
          </template>
      </div>
    
      <script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
      <script src="https://unpkg.com/vuetify-video-parallax"></script>
      <script>
        new Vue({
          data: () => ({ 
              message: 'Row',
          src: 'https://media.istockphoto.com/videos/the-couple-with-camping-backpacks-walking-to-the-mountain-top-slow-video-id1151597371',
           }),
        }).$mount('#app');
      </script>
      
    </body>
    </html>

    【讨论】:

      猜你喜欢
      • 2020-02-22
      • 2018-11-10
      • 1970-01-01
      • 1970-01-01
      • 2019-02-09
      • 2021-08-13
      • 1970-01-01
      • 1970-01-01
      • 2019-06-29
      相关资源
      最近更新 更多