vue v-for嵌套的問題,怎麽才能循環把options這個數組的值負值給options[index]

<template>
      <div class="box">
          <div v-for="(item,index) in number" class="row">
              <div v-for="(item,index) in number" class="col">
                <video-player class="vjs-custom-skin" :options="options[index]" >
                </video-player>
              </div>
          </div> 
      </div>
</template>

<script>
  require('videojs-flash')
  export default {
    data() {
      return {
         number:3,
         option:null,
      
         options:[
              {
                sources: [{
                  type: "rtmp/flv",
                  // src: "rtmp://192.168.0.11:1935/live/01"
                  src: "rtmp://live.hkstv.hk.lxdns.com/live/hks"
                }],
                techOrder: ['flash'],
                autoplay: true,
                controls: true,
                fluid:true    
              },
              {
                sources: [{
                  type: "rtmp/flv",
                  // src: "rtmp://192.168.0.11:1935/live/01"
                  src: "rtmp://live.hkstv.hk.lxdns.com/live/hks"
                }],
                techOrder: ['flash'],
                autoplay: true,
                controls: true,
                fluid:true    
              }       
         ]   
      }
    }
    
  }
</script>

<style scoped>
    .box{
      display: flex;
      flex-direction: column;
    }
    .row{
      display: flex;
      /*flex-wrap: wrap;*/
      flex: 1
    }
    .col{
      flex: 1;
    }
</style>
阅读 1.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题