imgCardLv2.vue 3.0 KB

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