imgCardLv2_exam.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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: 60px 0 60px 0;
  69. .mta-card-content-pc {
  70. display: flex;
  71. align-items: center;
  72. justify-content: center;
  73. img {
  74. width: 480px;
  75. height: 370px;
  76. }
  77. }
  78. .img-left {
  79. img {
  80. margin-left: 100px;
  81. }
  82. }
  83. .img-right {
  84. img {
  85. margin-right: 100px;
  86. }
  87. }
  88. .card-info {
  89. width: 490px;
  90. h5 {
  91. font-size: 24px;
  92. font-weight: 800;
  93. text-align: left;
  94. color: #333;
  95. margin:0 0 23px;
  96. }
  97. .card-info-num {
  98. font-size: 36px;
  99. font-weight: 500;
  100. color: #00B96B;
  101. margin-bottom: 16px;
  102. display: block;
  103. }
  104. }
  105. .mta-card-row {
  106. margin-bottom: 23px;
  107. font-size: 14px;
  108. font-weight: 500;
  109. color: #333;
  110. text-align: left;
  111. &:last-child{
  112. margin-bottom: 0px;
  113. }
  114. i {
  115. display: inline-block;
  116. width:8px;
  117. height: 8px;
  118. background: #00b96b;
  119. margin-right: 13px;
  120. border-radius: 50%;
  121. }
  122. span {
  123. line-height: 24px;
  124. }
  125. }
  126. @media (max-width: 768px) {
  127. margin: 0 auto 3%;
  128. padding: 0 20px;
  129. .mta-card-content-h5 {
  130. img {
  131. width: 80%;
  132. display: block;
  133. margin: 0 auto;
  134. text-align: center;
  135. }
  136. // card--info
  137. .card-info {
  138. width: 100%;
  139. h5 {font-size: 18px;margin: 20px 0 10px;}
  140. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  141. .card-des{
  142. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  143. }
  144. }
  145. }
  146. }
  147. }
  148. </style>