videoCard.vue 453 B

12345678910111213141516171819202122232425262728
  1. <template>
  2. <div class="video-card" @click="cardClick">
  3. <div></div>
  4. <h3 v-if="cardData.title">{{cardData.title}}</h3>
  5. <p v-if="cardData.des">{{cardData.des}}</p>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. name: "videoCard",
  11. props: {
  12. cardData: {
  13. type: Object,
  14. default: () => ({})
  15. }
  16. },
  17. methods: {
  18. cardClick() {
  19. this.$emit('card-click', this.cardData)
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped>
  25. </style>