BrandList.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <template>
  2. <div>
  3. <div id="brandsList" class="container">
  4. <div class="title-icon">品牌索引</div>
  5. <div class="hr-blue"></div>
  6. <ul class="row initials">
  7. <li class="col-xs-1 initial"><nuxt-link :to="'/product/brand?initial=ABC'">ABC</nuxt-link></li>
  8. <li class="col-xs-1 initial"><nuxt-link :to="'/product/brand?initial=DEF'">DEF</nuxt-link></li>
  9. <li class="col-xs-1 initial" @click="showList('GHI')">GHI</li>
  10. <li class="col-xs-1 initial" @click="showList('JKL')">JKL</li>
  11. <li class="col-xs-1 initial" @click="showList('MNO')">MNO</li>
  12. <li class="col-xs-1 initial" @click="showList('PQR')">PQR</li>
  13. <li class="col-xs-1 initial" @click="showList('STU')">STU</li>
  14. <li class="col-xs-1 initial" @click="showList('VWX')">VWX</li>
  15. <li class="col-xs-1 initial" @click="showList('YZ')">YZ</li>
  16. <li class="col-xs-1 initial" @click="showList('0~9')">0~9</li>
  17. </ul>
  18. <div id="brands">
  19. <div v-for="(brands, initial) in brandList" class="row container brands-page">
  20. <div class="brands-title">{{initial}}</div>
  21. <div class="hr-blue"></div>
  22. <div class="row brands-body">
  23. <div class="simplebrand" v-for="brand in brands">
  24. <div class="brand-name">
  25. <nuxt-link :to="`/product/brand/${brand.uuid}/`">
  26. <span>{{brand.nameEn}}</span>
  27. </nuxt-link>
  28. </div>
  29. <div>
  30. <nuxt-link :to="`/product/brand/${brand.uuid}/`" v-if="brand.nameEn!=brand.nameCn">
  31. <span class="brand-name-cn">{{brand.nameCn}}</span>
  32. </nuxt-link>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </template>
  41. <script>
  42. export default {
  43. name: 'brandList',
  44. computed: {
  45. brandList () {
  46. return this.$store.state.product.brand.brandList.data
  47. }
  48. },
  49. methods: {
  50. showList (keyword) {
  51. this.$store.dispatch('product/loadBrands', {'keyword': keyword})
  52. }
  53. }
  54. }
  55. </script>
  56. <style>
  57. /** brandList*/
  58. #brandsList {
  59. clear: both;
  60. width: 1190px;
  61. padding: 0px;
  62. }
  63. #brandsList .hr-blue {
  64. border-bottom: 2px solid #6493FF;
  65. border-right: 0px;
  66. border-top: 0px;
  67. border-left: 0px;
  68. width: 100%;
  69. }
  70. #brandsList .initials {
  71. margin-top: 3px;
  72. }
  73. #brandsList .row {
  74. margin: 20px 0px;
  75. }
  76. #brandsList .row .initial {
  77. display: inline-block;
  78. margin: 0 35px;
  79. font-size: 16px;
  80. color: #787878;
  81. }
  82. #brandsList .row .initial:hover{
  83. color: #5078CB;
  84. font-weight: bold;
  85. cursor: pointer;
  86. }
  87. #brandsList .row .initial-active{
  88. color: #5078CB;
  89. font-weight: bold;
  90. }
  91. #brands .container {
  92. width: 1190px;
  93. padding: 0px;
  94. }
  95. #brands .row .brands-title {
  96. width: 70px;
  97. height: 30px;
  98. padding-top: 5px;
  99. text-align: center;
  100. font-size: 16px;
  101. color: #fff;
  102. background-color: #6493FF;
  103. }
  104. #brands .row .brands-body {
  105. margin-bottom: 30px;
  106. font-size: 14px;
  107. color: #323232;
  108. }
  109. #brands .simplebrand {
  110. height: 30px;
  111. margin: 13px 0px;
  112. width: 25%;
  113. display: inline-block;
  114. }
  115. #brands .simplebrand a {
  116. color: #323232;
  117. text-decoration: none;
  118. }
  119. #brands .simplebrand:hover a{
  120. color: #6493FF;
  121. font-weight: bold;
  122. }
  123. #brands .simplebrand .brand-name {
  124. margin-bottom: 2px;
  125. }
  126. #brands .simplebrand .brand-name-cn {
  127. font-size: 12px;
  128. }
  129. #brandsList ul {
  130. padding-left: 0px;
  131. }
  132. #brandsList ul li {
  133. list-style: none;
  134. }
  135. #carousel li {
  136. width: 12px;
  137. height: 12px;
  138. margin: 3px;
  139. }
  140. </style>