cm-cart-expired-area.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="cart-supplier-area">
  3. <view class="area-top">
  4. <view class="expired">失效商品{{ expiredList.length }}件</view>
  5. <view class="clear" hover-class="hover-class" hover-stay-time="100" @click="$emit('clear')">
  6. 清空失效商品
  7. </view>
  8. </view>
  9. <!-- 失效商品列表 -->
  10. <view class="checkbox">
  11. <view class="tip">失效</view>
  12. <template v-for="item in expiredList">
  13. <cm-cart-product
  14. class="product"
  15. :isExpired="true"
  16. :key="item.productId"
  17. :productInfo="item"
  18. ></cm-cart-product>
  19. </template>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. name: 'cm-cart-expired-area',
  26. props: {
  27. expiredList: {
  28. type: Array,
  29. default: () => []
  30. }
  31. }
  32. }
  33. </script>
  34. <style lang="scss" scoped>
  35. .cart-supplier-area {
  36. padding: 24rpx;
  37. background: #fff;
  38. .tip {
  39. margin-right: 8rpx;
  40. }
  41. .area-top {
  42. @extend .cm-flex-between;
  43. margin-bottom: 24rpx;
  44. .hover-class {
  45. background: #ffeff0 !important;
  46. border-color: #ff457b;
  47. }
  48. .expired {
  49. font-size: 30rpx;
  50. color: #333333;
  51. }
  52. .clear {
  53. @extend .cm-flex-center;
  54. width: 184rpx;
  55. height: 42rpx;
  56. background: #fff8fd;
  57. border: 1rpx solid #ff457b;
  58. border-radius: 28rpx;
  59. font-size: 26rpx;
  60. color: #ff457b;
  61. }
  62. }
  63. .checkbox {
  64. @extend .cm-flex-between;
  65. .product {
  66. flex: 1;
  67. }
  68. .tip {
  69. width: 72rpx;
  70. height: 36rpx;
  71. line-height: 36rpx;
  72. text-align: center;
  73. background: rgba(51, 51, 51, 0.3);
  74. border-radius: 24rpx;
  75. font-size: 24rpx;
  76. color: #ffffff;
  77. }
  78. }
  79. }
  80. </style>