imgCardLv3_peixun.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <template>
  2. <div>
  3. <div class="mta-card-lv3 client-container">
  4. <div class="mta-card-content-pc mta-hidden-xs" :class="[img.order > contentOrder ? 'img-left': 'img-right']">
  5. <img :style="`order:${img.order}`" :src="img.url">
  6. <div class="card-info" :style="`order: ${contentOrder}`">
  7. <h5>{{ title }}</h5>
  8. <p>{{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. <h5>{{ title }}</h5>
  16. <em></em>
  17. <p>{{des}}</p>
  18. <slot></slot>
  19. </div>
  20. </div>
  21. </div>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. name: "imgCardLv3",
  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. contentOrder() {
  47. return this.option.content.order;
  48. },
  49. tagesPc() {
  50. return this.option.content.list;
  51. },
  52. tagesH5() {
  53. return this.option.content.list;
  54. }
  55. }
  56. }
  57. </script>
  58. <style lang="scss" scoped>
  59. .mta-card-lv3 {
  60. padding: 100px 0 100px 0;
  61. .mta-card-content-pc {
  62. display: flex;
  63. align-items: center;
  64. justify-content: center;
  65. img {
  66. max-width: 100%;
  67. height: auto;
  68. flex-shrink: 0;
  69. }
  70. }
  71. .img-left {
  72. img {
  73. margin-left: 100px;
  74. }
  75. }
  76. .img-right {
  77. img {
  78. margin-right: 100px;
  79. }
  80. }
  81. .card-info {
  82. width: 490px;
  83. h5 {
  84. font-size: 24px;
  85. font-weight: 800;
  86. text-align: left;
  87. color: #333;
  88. margin: 0 0 36px;
  89. }
  90. p {
  91. font-size: 14px;
  92. color: #333;
  93. line-height: 24px;
  94. text-align: justify;
  95. }
  96. }
  97. @media (max-width: 768px) {
  98. margin: 0 auto 3%;
  99. padding: 0 20px;
  100. .mta-card-content-h5 {
  101. img {
  102. width: 80%;
  103. display: block;
  104. margin: 0 auto;
  105. text-align: center;
  106. }
  107. // card--info
  108. .card-info {
  109. width: 100%;
  110. h5 {font-size: 16px;margin: 20px 0 10px;}
  111. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  112. .card-des{
  113. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  114. }
  115. }
  116. }
  117. }
  118. }
  119. </style>