goods-coupon-list.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <template>
  2. <view class="coupon-section">
  3. <view class="coupon-tags">
  4. <view class="tag" v-for="item in couponList" :key="item.couponId">
  5. <view class="coupon-label" v-text="item.couponTitle"></view>
  6. </view>
  7. </view>
  8. <view class="more" @click="$emit('click')">
  9. <text>领券</text>
  10. <text class="iconfont icon-chakangengduo"></text>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'goods-coupon-list',
  17. props: {
  18. couponList: {
  19. type: [Object, Array],
  20. default: null
  21. }
  22. }
  23. }
  24. </script>
  25. <style lang="scss" scoped>
  26. .coupon-section {
  27. @extend .cm-flex-between;
  28. padding: 0 24rpx;
  29. background-color: #fff;
  30. .coupon-tags {
  31. width: 80%;
  32. .tag {
  33. display: inline-block;
  34. height: 30rpx;
  35. padding: 0 8rpx;
  36. margin-right: 8rpx;
  37. background: #fff3f7;
  38. border: 1rpx solid #ff457b;
  39. border-radius: 4rpx;
  40. vertical-align: middle;
  41. .coupon-label {
  42. font-size: 22rpx;
  43. max-width: 230rpx;
  44. overflow: hidden;
  45. text-overflow: ellipsis;
  46. white-space: nowrap;
  47. color: #ff457b;
  48. &::before {
  49. content: '券 |';
  50. margin: 0 6rpx;
  51. margin-left: 0;
  52. }
  53. }
  54. &:first-child {
  55. margin-left: 0;
  56. }
  57. }
  58. }
  59. .more {
  60. line-height: 40rpx;
  61. text {
  62. font-size: 24rpx;
  63. color: #ff457b;
  64. }
  65. }
  66. }
  67. </style>