青蛙卖大米小程序2024-11-24
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.2 KiB

6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago
  1. <template>
  2. <view class="item" @click="$emit('click')">
  3. <view class="item-image">
  4. <image :src="item.image &&
  5. item.image.split(',')[0]" mode="aspectFill">
  6. </image>
  7. </view>
  8. <view class="info">
  9. <view class="title">
  10. {{ item.title }}
  11. </view>
  12. <view class="desc">
  13. {{ item.sku }}
  14. </view>
  15. <view class="price">
  16. {{ item.price }}
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. item: {
  25. default: {}
  26. }
  27. },
  28. data() {
  29. return {
  30. }
  31. },
  32. methods: {
  33. }
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .item {
  38. padding: 10rpx 20rpx;
  39. align-items: center;
  40. margin-bottom: 20rpx;
  41. display: flex;
  42. width: 100%;
  43. box-sizing: border-box;
  44. .item-image {
  45. width: 140rpx;
  46. height: 140rpx;
  47. flex-shrink: 0;
  48. image {
  49. height: 100%;
  50. width: 100%;
  51. border-radius: 20rpx;
  52. }
  53. }
  54. .info {
  55. padding: 20rpx;
  56. color: #555;
  57. flex: 1;
  58. .title {
  59. font-size: 28rpx;
  60. font-weight: 900;
  61. }
  62. .desc {
  63. font-size: 22rpx;
  64. color: #777;
  65. margin-top: 10rpx;
  66. }
  67. .price {
  68. text-align: right;
  69. color: #f40;
  70. font-size: 30rpx;
  71. font-weight: 900;
  72. }
  73. }
  74. }
  75. </style>