Item.vue 852 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <div class="flex flex-col gap-1 justify-center items-center text-center bg-black bg-opacity-20 rounded-md p-1">
  3. <p class="text-xl font-semibold" v-text="contact.full_name" />
  4. <p class="text-sm" v-text="contact.post" />
  5. <a :href="`mailto:${contact.email}`" v-text="`Почта: ${contact.email}`" />
  6. <div>
  7. <p v-text="`Телефон${ contact.phones.length > 1 ? 'ы' : '' }:`" />
  8. <p
  9. v-for="(phone, idx) in contact.phones"
  10. :key="idx"
  11. v-text="phone"
  12. />
  13. </div>
  14. </div>
  15. </template>
  16. <script setup lang="ts">
  17. interface TContact {
  18. address: string;
  19. email: string;
  20. full_name: string;
  21. phones: string[];
  22. post: string;
  23. }
  24. defineProps<{
  25. contact: TContact
  26. }>()
  27. </script>
  28. <style scoped>
  29. </style>