submit-goods-card.vue 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="slot" :style="showBorderBottom ? '' : 'border-bottom:none'">
  3. <view class="img"><u-image width="160rpx" height="160rpx" :src="data.cover"></u-image></view>
  4. <view class="info">
  5. <view class="title">{{ data.title }}</view>
  6. <view class="sku">{{ data.selectdSku.difference }}</view>
  7. <view class="price">
  8. <text>¥</text>
  9. <text>{{ data.selectdSku.price_selling }}</text>
  10. </view>
  11. <!-- <view class="tag">不支持七天无理由退货</view> -->
  12. </view>
  13. <view class="num">×{{ data.nums }}</view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'submit-goods-card',
  19. props: {
  20. // 数据源
  21. data: {
  22. type: Object,
  23. default: () => {
  24. return {};
  25. }
  26. },
  27. // 是否显示底部边框
  28. showBorderBottom: {
  29. type: Boolean,
  30. default: false
  31. }
  32. }
  33. };
  34. </script>
  35. <style lang="scss" scoped>
  36. .slot {
  37. display: flex;
  38. align-items: center;
  39. padding: 28rpx 0;
  40. border-bottom: 1rpx solid $app-theme-border-color;
  41. position: relative;
  42. .img {
  43. margin-right: 30rpx;
  44. }
  45. .info {
  46. width: 420rpx;
  47. .title {
  48. width: 100%;
  49. font-size: 28rpx;
  50. color: $app-theme-text-black-color;
  51. padding-bottom: 16rpx;
  52. overflow: hidden;
  53. white-space: nowrap;
  54. text-overflow: ellipsis;
  55. }
  56. .sku {
  57. font-size: 22rpx;
  58. color: $app-theme-text-gray-color;
  59. }
  60. .price {
  61. padding-top: 8rpx;
  62. text:nth-child(1) {
  63. font-size: 20rpx;
  64. font-family: PingFangSC-Medium, PingFang SC;
  65. font-weight: 500;
  66. color: $app-theme-text-black-color;
  67. }
  68. text:nth-child(2) {
  69. font-size: 28rpx;
  70. font-family: PingFangSC-Regular, PingFang SC;
  71. font-weight: 400;
  72. color: $app-theme-text-black-color;
  73. }
  74. }
  75. .tag {
  76. margin-top: 8rpx;
  77. background: rgba($app-theme-text-money-color, 0.1);
  78. border-radius: 4rpx;
  79. color: $app-theme-text-money-color;
  80. padding: 4rpx;
  81. font-size: 20rpx;
  82. display: inline-block;
  83. }
  84. }
  85. .num {
  86. position: absolute;
  87. top: 30rpx;
  88. right: 30rpx;
  89. color: $app-theme-text-gray-color;
  90. }
  91. }
  92. </style>