goods-coupon-list.vue 1.5 KB

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