IconPanel.vue 977 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <script setup lang="ts">
  2. defineProps<{
  3. iconName: string;
  4. title: string;
  5. desc: string;
  6. subDesc?: string;
  7. titleKey: string;
  8. descKey: string;
  9. subDescKey?:string
  10. }>();
  11. </script>
  12. <template>
  13. <div class="icon-panel">
  14. <BaseIcon :name="iconName" width="48" height="48" />
  15. <p class="title font-bold">{{ $t(titleKey) }}</p>
  16. <span class="desc" v-html="$t(descKey)"></span>
  17. <span class="desc" v-if="subDesc">{{ $t(subDescKey) }}</span>
  18. </div>
  19. </template>
  20. <style scoped lang="scss">
  21. .icon-panel {
  22. @include flex(y, center, center);
  23. .title {
  24. margin: 10px 0;
  25. font-size: 20px;
  26. line-height: 28px;
  27. }
  28. .desc {
  29. font-size: 14px;
  30. line-height: 20px;
  31. text-align: center;
  32. color: #565E66;
  33. }
  34. }
  35. .en {
  36. .title {
  37. text-align: center;
  38. font-size: 14px;
  39. }
  40. }
  41. @media screen and (min-width: 768px){
  42. .en{
  43. .icon-panel{
  44. .title{
  45. // font-size: 18px;
  46. }
  47. }
  48. }
  49. }
  50. </style>