InfoCard.vue 2.04 KB
<template>
  <v-card id="InfoCard" flat height="11rem">
    <v-card-actions>
      <v-btn class="refresh-btn" small flat :loading="loading" round>
        <i class="material-icons icon iconfont icon-shuaxin"></i>
      </v-btn>
    </v-card-actions>
    <v-card-title id="walletBalanceBlock" >
      <div class="titleBlock">钱包余额</div>
      <div class="numberBlock">{{info.balance || '0.00'}}</div>
    </v-card-title>
    <v-card-title id="waitingBalanceBlock" >
      <div class="halfBlock">
        <div class="titleBlock">待还借款</div>
        <div class="numberBlock">{{info.toBePaid || '0.00'}}</div>
      </div>
      <div class="halfBlock">
        <div class="titleBlock">待收金额</div>
        <div class="numberBlock">{{info.toBeReceived || '0.00'}}</div>
      </div>
    </v-card-title>
  </v-card>
</template>

<script>
export default {
  data: () => ({
    loading: false
  }),
  props:{
    info: {
      type: Object,
      default: () => ({})
    }
  }
}
</script>

<style lang="scss" scoped>
  #InfoCard {
    width: 92vw;
    margin-top: 0.8rem;
    background-image: linear-gradient(0deg, #282A2D 0%, #3A424A 100%);
    border-radius: 2px;

    .card__actions {
      position: relative;
      padding: 0;

      .refresh-btn {
        color: $gold;
        min-width: 1.7rem;
        height: 1.7rem;
        width: 2.5rem;
        font-size: 1.6rem;
        position: absolute;
        right: 0.4rem;
        top: 0.6rem;
      }
    }
    .titleBlock {
      font-size: 1.2rem;
      height: 1.2rem;
      text-align: center;
      font-weight: bold;
    }
    .numberBlock {
      font-size: 1.3rem;
      height: 1.3rem;
      text-align: center;
      font-weight: bold;
      margin-top: 0.5rem;            
      color: $gold;
    }
    #walletBalanceBlock {
      text-align: center;
      padding: 0;
      padding-top: 2.2rem;
      
      div {
        width: 100%;
       
      }
    }
    #waitingBalanceBlock {
      padding-top: 1.4rem;
      padding-bottom: 0.7rem;
      .halfBlock {
        width: 50%;
      }
    }
  }
</style>