HistoryStatisticsCard.vue 1.55 KB
<template>
  <v-card id="HistoryStatisticsCard" flat height="11rem">
    <v-card-title id="TotalBlock" >
      <div class="titleBlock">{{ type === 'borrow' ? '借入总额(元)' : '借出总额(元)'}}</div>
      <div class="numberBlock">{{data.total}}</div>
    </v-card-title>
    <v-card-title id="interestBlock" >
      <div class="halfBlock">
        <div class="titleBlock">总利息</div>
        <div class="numberBlock">{{data.interest}}</div>
      </div>
      <div class="halfBlock">
        <div class="titleBlock">{{ type === 'borrow' ? '借入次数' : '借出次数'}}</div>
        <div class="numberBlock">{{data.times}}</div>
      </div>
    </v-card-title>
  </v-card>
</template>

<script>
export default {
  data:() => ({
    
  }),
  props: ['type', 'data']
}
</script>

<style lang="scss" scoped>
  #HistoryStatisticsCard {
    width: 100vw;
    background-image: linear-gradient(0deg, #3A424A 0%, #3A424A 100%);
    border-radius: 2px;

    .titleBlock {
      font-size: 0.9rem;
      height: 1.1rem;
      text-align: center;
      font-weight: bold;
    }
    .numberBlock {
      font-size: 1rem;
      height: 1.1rem;
      text-align: center;
      margin-top: 0.5rem;            
      color: $gold;
    }
    #TotalBlock {
      text-align: center;
      padding-top: 2.2rem;
      
      div {
        width: 100%;
       
      }
    }
    #interestBlock {
      padding-top: 1.4rem;
      padding-bottom: 0.7rem;
      .halfBlock {
        width: 50%;
      }
    }
  }
</style>