style2.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template id="merchant-info-style2">
  2. <div class="merchant-info-style2">
  3. <diy-store-info
  4. :list="merchData.merchantList"
  5. :component-style="componentStyle"
  6. :computed-style="computedStyle"
  7. :merch-data="merchData"
  8. :btn-style="btnStyle"
  9. >
  10. <template v-slot="{ goodsTitleColor, goodsPriceColor }">
  11. <div class="merch-info-goods">
  12. <div class="info-goods-item" v-for="(it, i) in 5">
  13. <div class="goods-img" style="background: url(/resources/img/decorate/default_picture.png)"></div>
  14. <div class="goods-title over2" :style="{color: goodsTitleColor}">这里是商品标题这里是商品标题这里是商品标题</div>
  15. <div class="goods-price" :style="{color: goodsPriceColor}">¥20</div>
  16. </div>
  17. </div>
  18. </template>
  19. </diy-store-info>
  20. </div>
  21. </template>
  22. <script>
  23. Vue.component('merchant-info-style2', {
  24. name: "merchant-info-style2",
  25. props: {
  26. activeItem: {
  27. type: Object,
  28. default () {
  29. return {}
  30. }
  31. },
  32. btnStyle: {
  33. type: Object,
  34. default: () => {}
  35. },
  36. componentStyle: {
  37. type: Object,
  38. default: () => {}
  39. },
  40. computedStyle: {
  41. type: Object,
  42. default: () => {}
  43. },
  44. merchData: {
  45. type: Object,
  46. default: () => {}
  47. }
  48. },
  49. template: '#merchant-info-style2',
  50. });
  51. </script>
  52. <style>
  53. .merch-info-goods {
  54. position: relative;
  55. width: 100%;
  56. display: flex;
  57. overflow-x: auto;
  58. box-sizing: border-box;
  59. margin: 0 12px;
  60. }
  61. .info-goods-item {
  62. width: 100px;
  63. height: 164px;
  64. border-radius: 4px;
  65. float: none;
  66. flex-shrink: 0;
  67. margin-right: 8px;
  68. overflow: hidden;
  69. }
  70. .info-goods-item .goods-img {
  71. width: 100px;
  72. height: 100px;
  73. background-size: cover;
  74. position: relative;
  75. background-repeat: no-repeat;
  76. background-position: 50%;
  77. }
  78. .info-goods-item .goods-title {
  79. font-size: 12px;
  80. margin-top: 4px;
  81. }
  82. .info-goods-item .goods-price {
  83. font-size: 11px;
  84. font-weight: 700;
  85. color: #fd463e;
  86. margin-top: 4px;
  87. }
  88. ::-webkit-scrollbar {
  89. height: 5px;
  90. }
  91. </style>