Intro.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div v-if="props.item" class="logic-intro-item">
  3. <div v-if="props.item?.texts?.length" class="logic-intro-description">
  4. <p v-for="(item, index) in props.item?.texts" :key="index">{{ item }}</p>
  5. </div>
  6. <div class="logic-intro-sign flex-center-v">
  7. <div class="logic-intro-sign-text">{{ props.item.notes }}</div>
  8. </div>
  9. </div>
  10. </template>
  11. <script lang="ts" setup>
  12. import { defineProps, PropType } from 'vue'
  13. interface itemInterface {
  14. tplType: string
  15. texts: string[]
  16. notes: string
  17. }
  18. const props = defineProps({
  19. item: {
  20. type: Object as PropType<itemInterface>
  21. }
  22. })
  23. </script>
  24. <style lang="scss" scoped>
  25. .logic-intro-item {
  26. position: relative;
  27. overflow: hidden;
  28. background: #fff;
  29. padding: 10px;
  30. color: #fff;
  31. background: linear-gradient(93deg, #367cf6 0%, #2c5ef6 100%);
  32. margin-bottom: 10px;
  33. border-radius: 10px;
  34. font-size: 15px;
  35. padding: 10px;
  36. .logic-intro-sign {
  37. padding: 10px;
  38. background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  39. }
  40. .logic-intro-sign-text {
  41. font-size: 10px;
  42. color: #ffeaa9;
  43. border-radius: 100px;
  44. padding: 0 15px;
  45. width: 100%;
  46. text-align: center;
  47. }
  48. .logic-intro-description {
  49. margin-bottom: 27px;
  50. line-height: 1.6;
  51. font-size: 15px;
  52. }
  53. }
  54. </style>