Recommends.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. text-align: center;
  61. margin: 0;
  62. }
  63. #recommends .recommend-list .recommend {
  64. width: 220px;
  65. height: 210px;
  66. border: 1px solid #D6D3CE;
  67. margin-right: 22.5px;
  68. padding: 0;
  69. float: left;
  70. overflow: hidden;
  71. }
  72. #recommends .recommend-list .recommend:last-child{
  73. margin-right: 0px !important;
  74. }
  75. #recommends .recommend-list .recommend a {
  76. text-decoration: none;
  77. }
  78. #recommends .recommend-list .recommend .img{
  79. width: 200px;
  80. height: 80px;
  81. display: inline-block;
  82. overflow: hidden;
  83. line-height: 88px;
  84. text-align: center;
  85. }
  86. #recommends .recommend-list .recommend img{
  87. max-height: 80px;
  88. max-width: 200px;
  89. }
  90. #recommends .recommend-list .recommend .content {
  91. margin: 0 10px;
  92. height: 108px;
  93. text-align: left;
  94. overflow: hidden;
  95. text-overflow: ellipsis;
  96. white-space: nowrap;
  97. word-break: break-all;
  98. }
  99. #recommends .recommend-list .recommend .name {
  100. font-size: 16px;
  101. color: #383939;
  102. font-weight: 600;
  103. width: 200px;
  104. /*height: 30px;*/
  105. margin-bottom: 8px;
  106. white-space: nowrap;
  107. overflow: hidden;
  108. text-overflow: ellipsis;
  109. }
  110. #recommends .recommend-list .recommend .subject, #recommends .recommend-list .recommend .description {
  111. width: 200px;
  112. height: 35px;
  113. font-size: 12px;
  114. color: #797979;
  115. line-height: 18px;
  116. overflow: hidden;
  117. text-overflow: ellipsis;
  118. display: -webkit-box;
  119. -webkit-box-orient: vertical;
  120. -webkit-line-clamp: 2;
  121. max-height: 36px;
  122. }
  123. #recommends .recommend-list .recommend .description{
  124. /*overflow: hidden;
  125. text-overflow: ellipsis;
  126. display: -webkit-box;
  127. -webkit-box-orient: vertical;
  128. -webkit-line-clamp: 3;*/
  129. margin-top: 5px;
  130. }
  131. #recommends .recommend-list .recommend .subject span {
  132. width: 204px;
  133. white-space: pre-wrap;
  134. word-wrap : break-word ;
  135. overflow: hidden;
  136. text-overflow: ellipsis;
  137. }
  138. #recommends .recommend-list .recommend:hover{
  139. border: #5078cb 1px solid;
  140. }
  141. #recommends .recommend-list .recommend .description span {
  142. width: 204px;
  143. display: inline;
  144. white-space: pre-wrap;
  145. word-wrap : break-word ;
  146. overflow: hidden;
  147. text-overflow: ellipsis;
  148. }
  149. .title-icon {
  150. font-size: 24px;
  151. color: #323232;
  152. margin-bottom: 10px
  153. }
  154. </style>