Recommends.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. #recommends .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. font-family: "Microsoft Yahei";
  94. margin: 0 10px;
  95. height: 108px;
  96. text-align: left;
  97. overflow: hidden;
  98. text-overflow: ellipsis;
  99. white-space: nowrap;
  100. word-break: break-all;
  101. }
  102. #recommends .recommend-list .recommend .name {
  103. font-size: 16px;
  104. color: #383939;
  105. font-weight: 600;
  106. width: 200px;
  107. /*height: 30px;*/
  108. margin-bottom: 8px;
  109. white-space: nowrap;
  110. overflow: hidden;
  111. text-overflow: ellipsis;
  112. }
  113. #recommends .recommend-list .recommend .subject, #recommends .recommend-list .recommend .description {
  114. width: 200px;
  115. height: 35px;
  116. font-size: 12px;
  117. color: #797979;
  118. line-height: 18px;
  119. overflow: hidden;
  120. text-overflow: ellipsis;
  121. display: -webkit-box;
  122. -webkit-box-orient: vertical;
  123. -webkit-line-clamp: 2;
  124. max-height: 36px;
  125. }
  126. #recommends .recommend-list .recommend .description{
  127. /*overflow: hidden;
  128. text-overflow: ellipsis;
  129. display: -webkit-box;
  130. -webkit-box-orient: vertical;
  131. -webkit-line-clamp: 3;*/
  132. margin-top: 5px;
  133. }
  134. #recommends .recommend-list .recommend .subject span {
  135. width: 204px;
  136. white-space: pre-wrap;
  137. word-wrap : break-word ;
  138. overflow: hidden;
  139. text-overflow: ellipsis;
  140. }
  141. #recommends .recommend-list .recommend:hover{
  142. border: #5078cb 1px solid;
  143. }
  144. #recommends .recommend-list .recommend .description span {
  145. width: 204px;
  146. display: inline;
  147. white-space: pre-wrap;
  148. word-wrap : break-word ;
  149. overflow: hidden;
  150. text-overflow: ellipsis;
  151. }
  152. .title-icon {
  153. font-size: 24px;
  154. color: #323232;
  155. margin-top: 30px;
  156. margin-bottom: 10px
  157. }
  158. </style>