<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: 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: '0asdf0980q9238409812304980932',
        },
      ]
    },
  },
})
</script>

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