imgCardLv2.vue 3.1 KB

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