brandList.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. <div class="ul clearfix">
  6. <div class="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. </div>
  14. </div>
  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: 20upx 0;
  38. .hom-title{
  39. font-size: 22upx;
  40. color: #333;
  41. line-height: 1em;
  42. margin-bottom: 23upx;
  43. font-weight: bold;
  44. }
  45. .content-warp{
  46. display: flex;
  47. }
  48. .first{
  49. width: 24%;
  50. padding-top: 10upx;
  51. .item{
  52. background-color: #7A8594;
  53. height: 336upx;
  54. display: flex;
  55. flex-direction: column;
  56. justify-content: center;
  57. .h3{
  58. font-size: 30upx;
  59. line-height: 46upx;
  60. margin-bottom: 10upx;
  61. }
  62. }
  63. }
  64. .ul{
  65. width: 100%;
  66. .li{
  67. width: 25%;
  68. float: left;
  69. padding: 10upx 0 0 10upx;
  70. box-sizing: border-box;
  71. .item{
  72. height: auto;
  73. display: flex;
  74. flex-direction: column;
  75. justify-content: center;
  76. .imgBox {
  77. padding-bottom: 80%;
  78. background-color: #cacaca;
  79. position: relative;
  80. }
  81. .h4{
  82. font-size: 18upx;
  83. color: #333333;
  84. text-align: center;
  85. height: 40upx;
  86. line-height: 40upx;
  87. }
  88. .p{
  89. font-size: 12upx;
  90. margin: 7upx 0 12upx;
  91. }
  92. img {
  93. max-width: 100%;
  94. height: 100%;
  95. max-height: 100%;
  96. position: absolute;
  97. margin: auto;
  98. top: 0;
  99. right: 0;
  100. bottom: 0;
  101. left: 0;
  102. }
  103. }
  104. }
  105. }
  106. }
  107. .terminal1,.terminal2,.terminal3{
  108. &.brand-list{
  109. width: 710upx;
  110. margin: 0 auto;
  111. .content-warp{
  112. display: block;
  113. }
  114. .first{
  115. width: 100%;
  116. }
  117. .ul{
  118. width: auto;
  119. margin-left: -15upx;
  120. .li{
  121. width: 50%;
  122. padding: 15upx 0 0 15upx;
  123. .item {
  124. padding-left: 0;
  125. }
  126. }
  127. }
  128. }
  129. }
  130. </style>