Logo.vue 961 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <nuxt-link
  3. :href="href"
  4. target="_blank"
  5. class="link"
  6. >
  7. <v-img
  8. :src="img"
  9. :height="height"
  10. :min-height="height"
  11. :max-height="height"
  12. :alt="alt"
  13. />
  14. </nuxt-link>
  15. </template>
  16. <script setup lang="ts">
  17. import type { PropType } from '@vue/runtime-core'
  18. defineProps({
  19. href: String,
  20. img: String,
  21. alt: {
  22. type: String as PropType<string | undefined>,
  23. required: false,
  24. default: ''
  25. },
  26. height: {
  27. type: Number as PropType<string | number | undefined>,
  28. required: false,
  29. default: 26
  30. }
  31. })
  32. </script>
  33. <style scoped lang="scss">
  34. .link {
  35. width: 20%;
  36. margin: 0 auto;
  37. max-width: 140px;
  38. padding: 8px;
  39. display: flex;
  40. flex-direction: column;
  41. justify-content: center;
  42. align-items: center;
  43. :deep(.v-img) {
  44. width: 100%;
  45. }
  46. @media (max-width: 540px) {
  47. width: 100%;
  48. margin: 12px auto;
  49. }
  50. }
  51. :deep(.v-img__img) {
  52. display: block !important;
  53. }
  54. </style>