imgCardLv2_exam.vue 3.3 KB

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