videoPlay.vue 576 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view>
  3. <video
  4. :src="video"
  5. preload
  6. autoplay
  7. show-play-btn="false"
  8. controls="false"
  9. loop="true"
  10. ref="video_url"
  11. play-btn-position="center"
  12. class="video"
  13. :posters="pic">
  14. </video>
  15. </view>
  16. </template>
  17. <script>
  18. export default{
  19. data() {
  20. return {
  21. video : '',
  22. pic : '',
  23. }
  24. },
  25. onLoad() {
  26. this.video = this.Dever.data('video');
  27. this.pic = this.Dever.data('pic');
  28. },
  29. methods:{
  30. },
  31. }
  32. </script>
  33. <style>
  34. video{
  35. position: absolute;
  36. width: 100%;
  37. height: 100%;
  38. top: 0;
  39. left: 0;
  40. }
  41. </style>