brandList.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <template>
  2. <div class="brand-list warp" :class="'terminal' + terminal">
  3. <h2 class="hom-title" :style="{textAlign:componentContent.textAlign}">{{componentContent.title}}</h2>
  4. <div class="content-warp">
  5. <ul class="clearfix">
  6. <li v-for="(item, index) in componentContent.imgList" :key="index">
  7. <a class="item a-link" @click="jumpLink(item.linkObj)">
  8. <div class="imgBox">
  9. <img :src="item.imgData" v-show="item.imgData" :alt="item.title">
  10. </div>
  11. <h4 class="h4">{{item.title}}</h4>
  12. </a>
  13. </li>
  14. </ul>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. import {funMixin} from '../config/mixin'
  20. export default {
  21. name: 'brandList',
  22. mixins: [funMixin],
  23. props: {
  24. terminal: {
  25. type: Number,
  26. default: 4
  27. },
  28. componentContent: {
  29. type: Object
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .brand-list{
  36. color: #fff;
  37. padding: 20px 0;
  38. .hom-title{
  39. font-size: 22px;
  40. color: #333;
  41. line-height: 1em;
  42. margin-bottom: 23px;
  43. font-weight: bold;
  44. }
  45. .content-warp{
  46. display: flex;
  47. }
  48. .first{
  49. width: 24%;
  50. padding-top: 10px;
  51. .item{
  52. background-color: #7A8594;
  53. height: 336px;
  54. display: flex;
  55. flex-direction: column;
  56. justify-content: center;
  57. .h3{
  58. font-size: 30px;
  59. line-height: 46px;
  60. margin-bottom: 10px;
  61. }
  62. }
  63. }
  64. ul{
  65. width: 100%;
  66. li{
  67. width: 25%;
  68. float: left;
  69. padding: 10px 0 0 10px;
  70. .item{
  71. height: auto;
  72. display: flex;
  73. flex-direction: column;
  74. justify-content: center;
  75. .imgBox {
  76. padding-bottom: 80%;
  77. background-color: #cacaca;
  78. position: relative;
  79. }
  80. .h4{
  81. font-size: 18px;
  82. color: #333333;
  83. text-align: center;
  84. height: 40px;
  85. line-height: 40px;
  86. }
  87. .p{
  88. font-size: 12px;
  89. margin: 7px 0 12px;
  90. }
  91. img {
  92. max-width: 100%;
  93. height: 100%;
  94. max-height: 100%;
  95. position: absolute;
  96. margin: auto;
  97. top: 0;
  98. right: 0;
  99. bottom: 0;
  100. left: 0;
  101. }
  102. }
  103. }
  104. }
  105. }
  106. .terminal1,.terminal2,.terminal3{
  107. &.brand-list{
  108. .content-warp{
  109. display: block;
  110. }
  111. .first{
  112. width: 100%;
  113. }
  114. ul{
  115. width: auto;
  116. margin-left: -15px;
  117. li{
  118. padding: 15px 0 0 15px;
  119. width: 50%;
  120. .item {
  121. padding-left: 0;
  122. }
  123. }
  124. }
  125. }
  126. }
  127. </style>