imgCardLv2.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <div class="mta-card-lv2">
  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. <span class="card-info-num" v-if="num">{{ num }}</span>
  7. <h5>{{ title }}</h5>
  8. <div class="mta-card-row" v-for="(rowItem,index) in tagesPc" :key="`pc-${index}`">
  9. <i></i><span>{{ rowItem.value }}</span>
  10. </div>
  11. <slot></slot>
  12. </div>
  13. </div>
  14. <div class="mta-card-content-h5 mta-hidden-sm">
  15. <img :src="img.url">
  16. <div class="card-info">
  17. <h5>{{ title }}</h5>
  18. <div class="mta-card-row" v-for="(rowItem,index) in tagesH5" :key="`H5-${index}`">
  19. <i></i><span>{{ rowItem.value }}</span>
  20. </div>
  21. <slot></slot>
  22. </div>
  23. </div>
  24. </div>
  25. </template>
  26. <script>
  27. export default {
  28. name: "imgCardLv2",
  29. props: {
  30. option: {
  31. type: Object,
  32. required: true,
  33. },
  34. },
  35. data() {
  36. return {}
  37. },
  38. computed: {
  39. num() {
  40. return this.option.content.num;
  41. },
  42. img() {
  43. return {url: this.option.img.url, order: this.option.img.order}
  44. },
  45. title() {
  46. return this.option.content.title;
  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-lv2 {
  62. margin: 0 auto 120px;
  63. .mta-card-content-pc {
  64. display: flex;
  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. h5 {
  82. font-size: 24px;
  83. font-weight: 800;
  84. text-align: left;
  85. color: #333;
  86. margin-top: 40px;
  87. margin-bottom: 23px;
  88. }
  89. .card-info-num {
  90. font-size: 37px;
  91. font-weight: 500;
  92. color: #00B96B;
  93. margin-bottom: 17px;
  94. }
  95. }
  96. .mta-card-row {
  97. margin-bottom: 23px;
  98. font-size: 14px;
  99. font-weight: 500;
  100. color: #333;
  101. text-align: left;
  102. &:last-child{
  103. margin-bottom: 0px;
  104. }
  105. i {
  106. display: inline-block;
  107. width:13px;
  108. height: 13px;
  109. background: #00b96b;
  110. margin-right: 13px;
  111. border-radius: 50%;
  112. }
  113. span {
  114. line-height: 24px;
  115. }
  116. }
  117. }
  118. </style>