imgCardLv2.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <template>
  2. <div class="mta-card-lv2">
  3. <div class="mta-card-content-pc mta-hidden-xs" :class="[img.order> contentOrder ? 'img-left': 'img-right']">
  4. <img :style="`order:${img.order}`" :src="img.url">
  5. <div class="card-info" :style="`order: ${contentOrder}`">
  6. <span class="card-info-num" v-if="num">{{ num }}</span>
  7. <h5>{{ title }}</h5>
  8. <div class="mta-card-row" v-for="(rowItem,index) in tagesPc" :key="`pc-${index}`">
  9. <i></i><span>{{ rowItem.value }}</span>
  10. </div>
  11. <slot></slot>
  12. </div>
  13. </div>
  14. <div class="mta-card-content-h5 mta-hidden-sm">
  15. <img :src="img.url">
  16. <div class="card-info">
  17. <h5>{{ title }}</h5>
  18. <em></em>
  19. <div class="mta-card-row" v-for="(rowItem,index) in tagesH5" :key="`H5-${index}`">
  20. <i></i><span>{{ rowItem.value }}</span>
  21. </div>
  22. <slot></slot>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: "imgCardLv2",
  30. props: {
  31. option: {
  32. type: Object,
  33. required: true,
  34. },
  35. },
  36. data() {
  37. return {}
  38. },
  39. computed: {
  40. num() {
  41. return this.option.content.num;
  42. },
  43. img() {
  44. return {url: this.option.img.url, order: this.option.img.order}
  45. },
  46. title() {
  47. return this.option.content.title;
  48. },
  49. contentOrder() {
  50. return this.option.content.order;
  51. },
  52. tagesPc() {
  53. return this.option.content.list;
  54. },
  55. tagesH5() {
  56. return this.option.content.list;
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss" scoped>
  62. .mta-card-lv2 {
  63. margin: 0 auto 120px;
  64. .mta-card-content-pc {
  65. display: flex;
  66. img {
  67. width: 480px;
  68. height: 370px;
  69. }
  70. }
  71. .img-left {
  72. img {
  73. margin-left: 100px;
  74. }
  75. }
  76. .img-right {
  77. img {
  78. margin-right: 100px;
  79. }
  80. }
  81. .card-info {
  82. h5 {
  83. font-size: 24px;
  84. font-weight: 800;
  85. text-align: left;
  86. color: #333;
  87. margin-top: 40px;
  88. margin-bottom: 23px;
  89. }
  90. .card-info-num {
  91. font-size: 37px;
  92. font-weight: 500;
  93. color: #00B96B;
  94. margin-bottom: 17px;
  95. }
  96. }
  97. .mta-card-row {
  98. margin-bottom: 23px;
  99. font-size: 14px;
  100. font-weight: 500;
  101. color: #333;
  102. text-align: left;
  103. &:last-child{
  104. margin-bottom: 0px;
  105. }
  106. i {
  107. display: inline-block;
  108. width:8px;
  109. height: 8px;
  110. background: #00b96b;
  111. margin-right: 13px;
  112. border-radius: 50%;
  113. }
  114. span {
  115. line-height: 24px;
  116. }
  117. }
  118. }
  119. @media (max-width: 768px) {
  120. .mta-card-content-h5 {
  121. img {
  122. width: 100%;
  123. }
  124. // card--info
  125. .card-info {
  126. h5 {font-size: 16px;margin: 20px 0 10px;}
  127. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  128. .card-des{
  129. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  130. }
  131. }
  132. }
  133. }
  134. </style>