<template>
  <div class="c-perf">
    <div
      v-for="(item, i) in list"
      :key="i"
      class="h-1/4 pt-2.5"
      style="margin-left: 30px;"
    >
      <div class="text-text-color text-xs" style="margin-bottom: 2px;">
        {{ item.name }}
      </div>
      <div class="text-title-color text-sm font-bold">
        {{ 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: this.$t('lang.chainPerf.speed') as string,
          value: '2s' + this.speed,
        },
        {
          name: this.$t('lang.chainPerf.tps') as string,
          value: '13.3' + this.tps,
        },
        {
          name: this.$t('lang.chainPerf.txNumber') as string,
          value: this.txNumber,
        },
        {
          name: this.$t('lang.chainPerf.addressNumber') as string,
          //   value: '120391820' + this.addressNumber,
          value: '23842',
        },
      ]
    },
  },
})
</script>
<style lang="scss" scoped>
.c-perf {
  width: 145px;
  height: 225px;
  background: #ffffff;
  box-shadow: 0px 1px 8px 0px rgba(31, 52, 112, 0.06);
  border-radius: 2px;
}
</style>
