BrandList.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div class="search-brand-list">
  3. <ul>
  4. <nuxt-link :key="item.id" :to="`/search?w=${encodeURIComponent(item.nameEn)}&type=brand`" tag="li" v-for="item in brands">
  5. <div class="img inline-block">
  6. <img :src="item.logoUrl || '/images/component/default.png'" alt="">
  7. </div>
  8. <div class="params inline-block">
  9. <p>
  10. <span class="title inline-block">主营产品:</span>
  11. <span class="content inline-block" :title="item.series">{{item.series}}</span>
  12. </p>
  13. <p>
  14. <span class="title inline-block">应用领域:</span>
  15. <span class="content inline-block" :title="item.applications">{{item.applications}}</span>
  16. </p>
  17. <p>
  18. <span class="title inline-block">品牌介绍:</span>
  19. <span class="content inline-block" :title="item.brief">{{item.brief}}</span>
  20. </p>
  21. <p>
  22. <span class="title inline-block">官网地址:</span>
  23. <span class="content inline-block" :title="item.url">{{item.url}}</span>
  24. </p>
  25. </div>
  26. <button>了解详情</button>
  27. </nuxt-link>
  28. </ul>
  29. </div>
  30. </template>
  31. <script>
  32. export default {
  33. computed: {
  34. brands () {
  35. let brands = this.baseUtils.deepCopy(this.$store.state.searchData.searchList.listNew.data.content) || []
  36. if (brands.length) {
  37. brands.forEach(item => {
  38. if (item.application && item.application !== '') {
  39. item.applications = item.application.split(',').join('|')
  40. }
  41. })
  42. }
  43. return brands
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .search-brand-list {
  50. li {
  51. border: 1px solid #e8e8e8;
  52. border-bottom: none;
  53. padding: 29px 18px 25px 30px;
  54. &:last-child {
  55. border-bottom: 1px solid #e8e8e8;
  56. }
  57. .img {
  58. width: 208px;
  59. height: 156px;
  60. text-align: center;
  61. line-height: 154px;
  62. border-radius: 2px;
  63. background: #fff;
  64. border: 1px solid #e2e2e2;
  65. img {
  66. max-width: 186px;
  67. max-height: 152px;
  68. }
  69. }
  70. .params {
  71. margin-left: 12px;
  72. width: 743px;
  73. color: #666;
  74. p {
  75. margin-top: 15px;
  76. &:first-child {
  77. margin-top: 0;
  78. }
  79. .title {
  80. font-weight: bold;
  81. vertical-align: top;
  82. }
  83. .content {
  84. word-break: break-all;
  85. }
  86. }
  87. }
  88. button {
  89. outline: none;
  90. border: 1px solid #2496f1;
  91. border-radius: 3px;
  92. background: #fff;
  93. color: #2496f1;
  94. width: 100px;
  95. height: 28px;
  96. text-align: center;
  97. margin-left: 75px;
  98. &:hover {
  99. background: #2496f1;
  100. color: #fff;
  101. }
  102. }
  103. &:hover {
  104. background: #ecf2fd;
  105. cursor: pointer;
  106. .params {
  107. color: #2e91f0;
  108. }
  109. }
  110. }
  111. }
  112. </style>