goods-activity-popup.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <template>
  2. <view class="goods-activity-popup">
  3. <uni-popup ref="activitypPopup" type="bottom">
  4. <view class="activity-price" :style="{ paddingBottom: safeArea ? 0 : '32rpx' }">
  5. <view class="close iconfont icon-iconfontguanbi" @click="close"></view>
  6. <view class="popup-content">
  7. <view class="row th"> <view class="label">购买数</view> <view class="content">价格</view> </view>
  8. <view class="row" v-for="(item, index) in ladderList" :key="index">
  9. <view class="label" v-text="item.buyNum"></view>
  10. <view class="content" v-text="item.buyPrice"></view>
  11. </view>
  12. </view>
  13. </view>
  14. </uni-popup>
  15. </view>
  16. </template>
  17. <script>
  18. import { mapGetters } from 'vuex'
  19. export default {
  20. name: 'goods-activity-popup',
  21. props: {
  22. ladderList: {
  23. type: Array,
  24. default: () => []
  25. }
  26. },
  27. computed: {
  28. ...mapGetters(['safeArea'])
  29. },
  30. methods: {
  31. open() {
  32. this.$refs.activitypPopup.open()
  33. this.$emit('open')
  34. },
  35. close() {
  36. this.$refs.activitypPopup.close()
  37. this.$emit('close')
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss" scoped>
  43. .activity-price {
  44. padding: 32rpx;
  45. padding-top: 64rpx;
  46. position: relative;
  47. background-color: #fff;
  48. border-radius: 16rpx 16rpx 0 0;
  49. &::after {
  50. position: absolute;
  51. content: '';
  52. width: 100%;
  53. height: 80rpx;
  54. left: 0;
  55. bottom: -80rpx;
  56. background-color: #fff;
  57. }
  58. .close {
  59. position: absolute;
  60. right: 24rpx;
  61. top: 24rpx;
  62. color: #999;
  63. font-size: 32rpx;
  64. }
  65. .popup-content {
  66. padding: 24rpx 0;
  67. }
  68. .row {
  69. @extend .cm-flex-between;
  70. color: #333333;
  71. text-align: center;
  72. border-top: 1rpx solid;
  73. border-left: 1rpx solid;
  74. border-right: 1rpx solid;
  75. border-color: #e1e1e1;
  76. &:last-child {
  77. border-bottom: 1rpx solid #e1e1e1;
  78. }
  79. &.th {
  80. font-size: 32rpx;
  81. }
  82. .label {
  83. flex: 1;
  84. font-size: 26rpx;
  85. padding: 24rpx 8rpx;
  86. border-right: 1rpx solid #e1e1e1;
  87. }
  88. .content {
  89. flex: 1;
  90. padding: 24rpx 8rpx;
  91. font-size: 26rpx;
  92. }
  93. }
  94. }
  95. </style>