<template>
  <div class="card bg-white flex text-center shadow-shadow1">
    <div class="w-1/4 mt-10" v-for="(item, index) in list" :key="index">
      <div class=" text-text-color">{{ item.name }}</div>
      <div
        class="mt-4 text-title-color text-xl font-bold overflow-hidden overflow-ellipsis"
      >
        {{ item.value }}
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  props: {
    speed: String,
    tps: Number,
    txNumber: Number,
    addressNumber: Number,
  },
  computed: {
    list(): { name: string; value: string | number }[] {
      return [
        {
          name: '出块速度',
          value: '2s' + this.speed,
        },
        {
          name: 'TPS',
          value: '13.3' + this.tps,
        },
        {
          name: '交易总数',
          value: '120398' + this.txNumber,
        },
        {
          name: '地址总数',
          //   value: '120391820' + this.addressNumber,
          value: '0asdf0980q9238409812304980932',
        },
      ]
    },
  },
})
</script>

<style scoped>
.card {
  width: 820px;
  height: 140px;
  border-radius: 4px;
}
</style>
