style3.php 2.7 KB

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