collection-card.vue 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <div style="width: 240px; height: 180px">
  3. <router-link :to="`/video/${videoInfo.videoId}`">
  4. <div style="position: relative;">
  5. <v-img
  6. :src="videoInfo.coverUrl"
  7. outlined
  8. aspect-ratio="1.77"
  9. />
  10. <span style="position: absolute; bottom: 0; right: 0; color:red">{{ videoInfo.duration }}</span>
  11. </div>
  12. </router-link>
  13. <v-row>
  14. <v-col cols="10">
  15. <p style="font-size: 15px; margin-bottom: 0px;color: black;">
  16. <router-link :to="`/video/${videoInfo.videoId}`" style="color: black;"> {{ videoInfo.title }} </router-link>
  17. </p>
  18. </v-col>
  19. </v-row>
  20. </div>
  21. </template>
  22. <script>
  23. import TimeUtil from '@/utils/time-util.vue'
  24. export default {
  25. name: 'CollectionCard',
  26. props: {
  27. video: {
  28. type: Object,
  29. default: () => {}
  30. }
  31. },
  32. data() {
  33. return {
  34. TimeUtil,
  35. videoInfo: this.video
  36. }
  37. },
  38. created() {
  39. }
  40. }
  41. </script>
  42. <style>
  43. </style>