goods-coupon-list.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. &::before {
  41. content: '券 |';
  42. margin: 0 6rpx;
  43. }
  44. &:first-child {
  45. margin-left: 0;
  46. }
  47. }
  48. }
  49. .more {
  50. line-height: 40rpx;
  51. text {
  52. font-size: 24rpx;
  53. color: #ff457b;
  54. }
  55. }
  56. }
  57. </style>