imgCardLv3_peixun.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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: 60px 0 60px 0;
  61. .mta-card-content-pc {
  62. display: flex;
  63. align-items: center;
  64. justify-content: center;
  65. img {
  66. width: 480px;
  67. height: 370px;
  68. }
  69. }
  70. .img-left {
  71. img {
  72. margin-left: 100px;
  73. }
  74. }
  75. .img-right {
  76. img {
  77. margin-right: 100px;
  78. }
  79. }
  80. .card-info {
  81. width: 490px;
  82. h5 {
  83. font-size: 24px;
  84. font-weight: 800;
  85. text-align: left;
  86. color: #333;
  87. margin: 0 0 36px;
  88. }
  89. p {
  90. font-size: 14px;
  91. color: #333;
  92. line-height: 24px;
  93. text-align: justify;
  94. }
  95. }
  96. @media (max-width: 768px) {
  97. margin: 0 auto 3%;
  98. padding: 20px;
  99. .mta-card-content-h5 {
  100. img {
  101. width: 80%;
  102. display: block;
  103. margin: 0 auto;
  104. text-align: center;
  105. }
  106. // card--info
  107. .card-info {
  108. width: 100%;
  109. h5 {font-size: 16px;margin: 20px 0 10px;}
  110. em{width: 35px;height: 3px;background: #00b96b;display: block;margin-bottom: 20px;}
  111. .card-des{
  112. font-size: 14px;margin: 20px 0 10px;text-align: justify;line-height: 22px;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. </style>