my-goods.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view>
  3. <view class="goods">
  4. <view class="goods-img">
  5. <image v-if="item.imgUrl" mode="aspectFit" class="wh-full" :src="item.imgUrl"></image>
  6. <view v-else class="pic"></view>
  7. </view>
  8. <view class="right-info">
  9. <view class="good-title">{{item.skuName}}</view>
  10. <view class="w-full flex-a">
  11. <view class="g-left">
  12. <view class="spec">{{item.skuProperties}}</view>
  13. <view class="price">{{item.price}}</view>
  14. </view>
  15. <view class="g-right">
  16. <slot></slot>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. name: "my-goods",
  26. data() {
  27. return {
  28. show: false
  29. };
  30. },
  31. props: {
  32. item: {
  33. type: Object,
  34. required: true
  35. }
  36. },
  37. methods: {
  38. close() {
  39. this.show = false;
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .goods {
  46. width: 100%;
  47. display: flex;
  48. align-items: center;
  49. .goods-img {
  50. height: 200rpx;
  51. width: 200rpx;
  52. flex-shrink: 0;
  53. .pic {
  54. width: 200rpx;
  55. height: 200rpx;
  56. background-color: #EEE;
  57. // flex-shrink: 0;
  58. }
  59. }
  60. .right-info {
  61. width: calc(100% - 200rpx);
  62. box-sizing: border-box;
  63. padding-left: 10rpx;
  64. .good-title {
  65. width: 100%;
  66. text-overflow: ellipsis;
  67. white-space: nowrap;
  68. font-size: $uni-font-size-base;
  69. overflow: hidden;
  70. padding-bottom: 10rpx;
  71. }
  72. .spec {
  73. height: 50rpx;
  74. display: flex;
  75. align-items: center;
  76. width: 200rpx;
  77. border-radius: 25px;
  78. background-color: #EFEFEF;
  79. font-size: $uni-font-size-sm;
  80. margin-bottom: 20rpx;
  81. box-sizing: border-box;
  82. padding: 0 20rpx;
  83. }
  84. }
  85. }
  86. .flex-a {
  87. display: flex;
  88. justify-content: space-between;
  89. }
  90. .my-popup {
  91. width: 100%;
  92. max-height: 800rpx;
  93. overflow: auto;
  94. padding-bottom: 130rpx;
  95. }
  96. </style>