imgCardLv4.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <template>
  2. <div class="mta-card-lv4">
  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. <p class="p-top">{{ des1 }}</p>
  7. <h5>解决方案</h5>
  8. <p class="p-bottom">{{des}}</p>
  9. <slot></slot>
  10. </div>
  11. </div>
  12. <div class="mta-card-content-h5 mta-hidden-sm">
  13. <img :src="img.url">
  14. <div class="card-info">
  15. <p class="p-top">{{ des1 }}</p>
  16. <h5>解决方案</h5>
  17. <em></em>
  18. <p class="p-bottom">{{des}}</p>
  19. <slot></slot>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. name: "imgCardLv4",
  27. props: {
  28. option: {
  29. type: Object,
  30. required: true,
  31. },
  32. },
  33. data() {
  34. return {}
  35. },
  36. computed: {
  37. img() {
  38. return {url: this.option.img.url, order: this.option.img.order}
  39. },
  40. title() {
  41. return this.option.content.title;
  42. },
  43. des() {
  44. return this.option.content.des;
  45. },
  46. des1() {
  47. return this.option.content.des1;
  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-lv4 {
  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. .card-info {
  74. width: 503px;
  75. h5 {
  76. font-size: 24px;
  77. font-weight: 800;
  78. text-align: left;
  79. color: #333;
  80. margin: 0 0 20px;
  81. position: relative;
  82. &:before {
  83. content: '';
  84. position: absolute;
  85. bottom: -5px;
  86. width: 100px;
  87. height: 3px;
  88. background: #00b96b;
  89. }
  90. }
  91. p {
  92. font-size: 14px;
  93. font-weight: 500;
  94. color: #333;
  95. line-height: 24px;
  96. }
  97. p.p-top {
  98. margin-top: 30px;
  99. margin-bottom: 30px;
  100. }
  101. p.p-bottom {
  102. margin-top: 20px;
  103. margin-bottom: 40px;
  104. }
  105. }
  106. }
  107. .img-left {
  108. img {
  109. margin-left: 100px;
  110. }
  111. }
  112. .img-right {
  113. img {
  114. margin-right: 100px;
  115. }
  116. }
  117. @media (max-width: 768px) {
  118. margin: 0 auto 60px;
  119. .mta-card-content-h5 {
  120. img {
  121. width: 80%;
  122. display: block;
  123. margin: 0 auto;
  124. text-align: center;
  125. }
  126. // card--info
  127. .card-info {
  128. width: 100%;
  129. h5 {font-size: 16px;margin: 20px 0 10px;}
  130. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  131. p{
  132. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  133. }
  134. }
  135. }
  136. }
  137. }
  138. </style>