Recommends.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <div id="recommends" class="container">
  3. <div class="title-icon">品牌推荐</div>
  4. <div class="hr-blue"></div>
  5. <ul class="recommend-list list-unstyled list-inline">
  6. <li class="recommend" v-for="hotBrand in hotBrands">
  7. <nuxt-link :to="`/product/brand/${hotBrand.uuid}/`">
  8. <div class="img"><img :src="hotBrand.logoUrl || '/images/all/default.png'" /></div>
  9. <div class="content">
  10. <div class="name">
  11. <span :title="hotBrand.nameEn">{{hotBrand.nameEn}}</span>
  12. </div>
  13. <div class="subject">
  14. <strong>主营分类</strong>: <span>{{hotBrand.series}}</span> <span v-if="!hotBrand.series">未知</span>
  15. </div>
  16. <div class="description">
  17. <strong>品牌介绍</strong>:<span v-html="hotBrand.brief"></span> <span v-if="!hotBrand.brief">暂无简介</span>
  18. </div>
  19. </div>
  20. </nuxt-link>
  21. </li>
  22. </ul>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: 'recommends',
  28. computed: {
  29. hotBrands () {
  30. return this.$store.state.product.brand.recommends.data
  31. }
  32. }
  33. }
  34. </script>
  35. <style>
  36. #newBrands .newBrands-header img {
  37. width: 35px;
  38. height: 35px;
  39. margin-left: 35px;
  40. }
  41. #newBrands .newBrands-body .newBrand .newBrand-img img {
  42. width: 100px;
  43. height: 60px;
  44. line-height: 14px;
  45. border: 1px solid #ccc;
  46. }
  47. #recommends {
  48. width: 1190px;
  49. padding: 0px;
  50. }
  51. .hr-blue {
  52. border-bottom: 2px solid #6493FF;
  53. border-right: 0px;
  54. border-top: 0px;
  55. border-left: 0px;
  56. width: 100%;
  57. margin-bottom: 20px;
  58. }
  59. #recommends .recommend-list {
  60. margin-bottom: 20px;
  61. text-align: center;
  62. margin: 0;
  63. }
  64. #recommends .recommend-list .recommend {
  65. width: 220px;
  66. height: 210px;
  67. border: 1px solid #D6D3CE;
  68. margin-right: 22.5px;
  69. margin-bottom: 22px;
  70. padding: 0;
  71. float: left;
  72. overflow: hidden;
  73. }
  74. #recommends .recommend-list .recommend:last-child{
  75. margin-right: 0px !important;
  76. }
  77. #recommends .recommend-list .recommend a {
  78. text-decoration: none;
  79. }
  80. #recommends .recommend-list .recommend .img{
  81. width: 200px;
  82. height: 80px;
  83. display: inline-block;
  84. overflow: hidden;
  85. line-height: 88px;
  86. text-align: center;
  87. }
  88. #recommends .recommend-list .recommend img{
  89. max-height: 80px;
  90. max-width: 200px;
  91. }
  92. #recommends .recommend-list .recommend .content {
  93. margin: 0 10px;
  94. height: 108px;
  95. text-align: left;
  96. overflow: hidden;
  97. text-overflow: ellipsis;
  98. white-space: nowrap;
  99. word-break: break-all;
  100. }
  101. #recommends .recommend-list .recommend .name {
  102. font-size: 16px;
  103. color: #383939;
  104. font-weight: 600;
  105. width: 200px;
  106. /*height: 30px;*/
  107. margin-bottom: 8px;
  108. white-space: nowrap;
  109. overflow: hidden;
  110. text-overflow: ellipsis;
  111. }
  112. #recommends .recommend-list .recommend .subject, #recommends .recommend-list .recommend .description {
  113. width: 200px;
  114. height: 35px;
  115. font-size: 12px;
  116. color: #797979;
  117. line-height: 18px;
  118. overflow: hidden;
  119. text-overflow: ellipsis;
  120. display: -webkit-box;
  121. -webkit-box-orient: vertical;
  122. -webkit-line-clamp: 2;
  123. max-height: 36px;
  124. }
  125. #recommends .recommend-list .recommend .description{
  126. /*overflow: hidden;
  127. text-overflow: ellipsis;
  128. display: -webkit-box;
  129. -webkit-box-orient: vertical;
  130. -webkit-line-clamp: 3;*/
  131. margin-top: 5px;
  132. }
  133. #recommends .recommend-list .recommend .subject span {
  134. width: 204px;
  135. white-space: pre-wrap;
  136. word-wrap : break-word ;
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. }
  140. #recommends .recommend-list .recommend:hover{
  141. border: #5078cb 1px solid;
  142. }
  143. #recommends .recommend-list .recommend .description span {
  144. width: 204px;
  145. display: inline;
  146. white-space: pre-wrap;
  147. word-wrap : break-word ;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. }
  151. .title-icon {
  152. font-size: 24px;
  153. color: #323232;
  154. margin-top: 30px;
  155. margin-bottom: 10px
  156. }
  157. </style>