WithdrawalRecord.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <div>
  3. <div class="list-header">
  4. <div class="header-text haeder-one">提现日期</div>
  5. <div class="header-text header-two">佣金</div>
  6. </div>
  7. <div class="record-list">
  8. <div class="record-item" v-for="(item, index) in data" :key="index">
  9. <div class="record-title">{{ item.withdrawalTime }}</div>
  10. <div class="record-time">¥{{ item.withdrawalMoney | keepTwo}}</div>
  11. </div>
  12. </div>
  13. </div>
  14. </template>
  15. <script>
  16. export default {
  17. name: 'WithdrawalRecord',
  18. props: {
  19. data: {
  20. type: Array,
  21. default: () => []
  22. }
  23. },
  24. filters: {
  25. // 保留小数2位
  26. keepTwo(val) {
  27. if (!val) return ''
  28. return Number(val).toFixed(2)
  29. }
  30. }
  31. }
  32. </script>
  33. <style lang="scss" scoped>
  34. .list-header{
  35. background-color: #FFEED7;
  36. display: flex;
  37. flex-wrap: nowrap;
  38. justify-content: space-around;
  39. .haeder-one{
  40. flex: 0.45;
  41. }
  42. .header-two{
  43. flex: 0.55;
  44. }
  45. .header-text{
  46. text-align: center;
  47. font-weight: 400;
  48. font-size: 12px;
  49. color: #333;
  50. line-height: 24px;
  51. }
  52. }
  53. .record-list{
  54. min-height: 165px;
  55. }
  56. .record-item{
  57. display: flex;
  58. flex-wrap: nowrap;
  59. justify-content: space-around;
  60. .record-title,
  61. .record-time{
  62. text-align: center;
  63. line-height: 33px;
  64. }
  65. .record-title{
  66. flex: 0.45;
  67. }
  68. .record-time{
  69. flex: 0.55;
  70. }
  71. }
  72. </style>