imgCardLv4.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <template>
  2. <div class="mta-card-lv3">
  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. <p class="p-bottom">{{des}}</p>
  18. <slot></slot>
  19. </div>
  20. </div>
  21. </div>
  22. </template>
  23. <script>
  24. export default {
  25. name: "imgCardLv3",
  26. props: {
  27. option: {
  28. type: Object,
  29. required: true,
  30. },
  31. },
  32. data() {
  33. return {}
  34. },
  35. computed: {
  36. img() {
  37. return {url: this.option.img.url, order: this.option.img.order}
  38. },
  39. title() {
  40. return this.option.content.title;
  41. },
  42. des() {
  43. return this.option.content.des;
  44. },
  45. des1() {
  46. return this.option.content.des1;
  47. },
  48. contentOrder() {
  49. return this.option.content.order;
  50. },
  51. tagesPc() {
  52. return this.option.content.list;
  53. },
  54. tagesH5() {
  55. return this.option.content.list;
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .mta-card-lv3 {
  62. margin: 0 auto 120px;
  63. .mta-card-content-pc {
  64. display: flex;
  65. img {
  66. width: 480px;
  67. height: 370px;
  68. }
  69. .card-info {
  70. h5 {
  71. font-size: 24px;
  72. font-weight: 800;
  73. text-align: left;
  74. color: #333;
  75. margin-top: 40px;
  76. margin-bottom: 23px;
  77. position: relative;
  78. &:before {
  79. content: '';
  80. position: absolute;
  81. bottom: -5px;
  82. width: 100px;
  83. height: 3px;
  84. background: #00b96b;
  85. }
  86. }
  87. p {
  88. font-size: 14px;
  89. font-weight: 500;
  90. color: #333;
  91. line-height: 24px;
  92. }
  93. p.p-top {
  94. margin-top: 30px;
  95. margin-bottom: 30px;
  96. }
  97. p.p-bottom {
  98. margin-top: 20px;
  99. margin-bottom: 40px;
  100. }
  101. }
  102. }
  103. .img-left {
  104. img {
  105. margin-left: 100px;
  106. }
  107. }
  108. .img-right {
  109. img {
  110. margin-right: 100px;
  111. }
  112. }
  113. }
  114. </style>