imgCardLv4.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  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. width: 480px;
  70. height: 370px;
  71. }
  72. .card-info {
  73. width: 503px;
  74. h5 {
  75. font-size: 24px;
  76. font-weight: 800;
  77. text-align: left;
  78. color: #333;
  79. margin: 0 0 20px;
  80. position: relative;
  81. &:before {
  82. content: '';
  83. position: absolute;
  84. bottom: -5px;
  85. width: 100px;
  86. height: 3px;
  87. background: #00b96b;
  88. }
  89. }
  90. p {
  91. font-size: 14px;
  92. font-weight: 500;
  93. color: #333;
  94. line-height: 24px;
  95. }
  96. p.p-top {
  97. margin-top: 30px;
  98. margin-bottom: 30px;
  99. }
  100. p.p-bottom {
  101. margin-top: 20px;
  102. margin-bottom: 40px;
  103. }
  104. }
  105. }
  106. .img-left {
  107. img {
  108. margin-left: 100px;
  109. }
  110. }
  111. .img-right {
  112. img {
  113. margin-right: 100px;
  114. }
  115. }
  116. @media (max-width: 768px) {
  117. margin: 0 auto 60px;
  118. .mta-card-content-h5 {
  119. img {
  120. width: 80%;
  121. display: block;
  122. margin: 0 auto;
  123. text-align: center;
  124. }
  125. // card--info
  126. .card-info {
  127. width: 100%;
  128. h5 {font-size: 16px;margin: 20px 0 10px;}
  129. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  130. p{
  131. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  132. }
  133. }
  134. }
  135. }
  136. }
  137. </style>