<video controls  :src="product.videoUrl" :poster="resURL + defaultImg"></video>
//controls 显示播放器
//poster  添加封面图片
//vue
<
van-swipe :autoplay="2000" :touchable="true"> <van-swipe-item v-if="product.videoUrl != ''"> <video controls :src="product.videoUrl" :poster="resURL + defaultImg"></video> </van-swipe-item> <van-swipe-item v-for="(image, index) in product" :key="index"> <img :src="image" mode="widthFix"/> </van-swipe-item> </van-swipe>
//小程序
<swiper >
                    <swiper-item v-if="videoo">
                        <video class="video" :src="videoo" bindplay="playVideo" controls="{{true}}" poster="{{resURL + defaultImg}}"></video>
   
                    </swiper-item>
                    <swiper-item v-for="(item, index) in product" :key="index">
                        
                        <image :src="item" class="slide-image" mode="widthFix" bindtap="perview(product.showPicList, resURL + item)"/>
                     
                    </swiper-item>
</swiper>

 

相关文章:

  • 2021-12-08
  • 2021-07-13
  • 2021-11-18
  • 2021-09-15
  • 2021-04-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-07
  • 2021-12-06
  • 2022-02-06
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案