HotCommodity.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <div class="container marketing hot-commodity">
  3. <div class="title">热销器件</div>
  4. <ul class="list-unstyled list-inline">
  5. <li class="hot-commodity-box" v-for="(component, index) in hotComponents" :class="{ 'border-right' : index % 5 == 4 }">
  6. <a :href="'/store/' + component.storeid + '/batchInfo/' + component.batchCode" target="_blank">
  7. <img :src="component.img || '/images/store/common/default.png'"/>
  8. <span>{{component.code}}</span>
  9. </a>
  10. </li>
  11. </ul>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'hot-commodity',
  17. computed: {
  18. hotComponents () {
  19. return this.$store.state.provider.storeCms.hotComponents.data
  20. }
  21. }
  22. }
  23. </script>
  24. <style scoped>
  25. .hot-commodity {
  26. margin-bottom: 40px;
  27. }
  28. .marketing .title {
  29. font-size: 24px;
  30. font-family: "Microsoft Yahei", "微软雅黑";
  31. line-height: 60px;
  32. height: 60px;
  33. font-weight: inherit;
  34. }
  35. .hot-commodity .hot-commodity-box {
  36. width: 238px;
  37. height: 239px;
  38. border-top: 1px solid #D6D3CE;
  39. border-left: 1px solid #D6D3CE;
  40. overflow: hidden;
  41. }
  42. .hot-commodity > ul > li {
  43. /*float: left;*/
  44. }
  45. .hot-commodity > ul > li:hover{
  46. border: #5078cb 1px solid;
  47. }
  48. .hot-commodity > ul > li:hover span{
  49. color: #5078cb;
  50. font-weight: bold;
  51. }
  52. .hot-commodity > ul > li:hover img{
  53. transform: scale(1.1);
  54. }
  55. .hot-commodity ul {
  56. border-bottom: 1px solid #D6D3CE;
  57. font-size: 0px;
  58. }
  59. .hot-commodity-box img {
  60. width: 238px;
  61. height: 180px;
  62. margin-top: 10px;
  63. }
  64. .hot-commodity-box span {
  65. font-size: 14px;
  66. font-family: "Microsoft Yahei", "微软雅黑";
  67. color: #333434;
  68. text-align: center;
  69. display: inline-block;
  70. width: 100%;
  71. height: 30px;
  72. line-height: 30px;
  73. margin-top: 12px;
  74. }
  75. .hot-commodity .border-right {
  76. border-right: 1px solid #D6D3CE;
  77. }
  78. </style>