cm-cart-expired-area.vue 2.1 KB

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