<template>
  <div class="mx-auto md:w-bodySet blockChain min-w-1200 relative">
    <ChainCard :msgList="msgList" class="chainCard"></ChainCard>
    <ChainTitle />
    <chain-search
      placeholder="请输入地址/交易哈希/区块高度/代币"
      :value="value"
      :setValue="setValue"
      :clickSearch="clickSearch"
    />
    <div class="rect-block"></div>
    <ChainOverview />
  </div>
</template>

<script lang="ts">
import Vue from 'vue'
import ChainCard from '@/components/pc/BlockChainBrowser/ChainOverview/ChainCard.vue'
import ChainTitle from '@/components/pc/BlockChainBrowser/ChainTitle.vue'
import ChainSearch from '@/components/pc/BlockChainBrowser/ChainSearch.vue'
import ChainOverview from '@/components/pc/BlockChainBrowser/ChainOverview/index.vue'

export default Vue.extend({
  components: { ChainCard, ChainTitle, ChainSearch, ChainOverview },
  data() {
    return {
      msgList: [
        {
          icon: require('@/assets/images/blockChainBrowser/home/latestBlock.png'),
          title: '最新区块',
          number: 102938,
        },
        {
          icon: require('@/assets/images/blockChainBrowser/home/nodeNumber.png'),
          title: '节点数量',
          number: 102938,
        },
        {
          icon: require('@/assets/images/blockChainBrowser/home/circulateNumber.png'),
          title: '流通量',
          number: 102938,
        },
        {
          icon: require('@/assets/images/blockChainBrowser/home/pledgeQuantity.png'),
          title: '质押数量',
          number: 102938,
        },
      ],
      value: '',
    }
  },
  methods: {
    setValue(v: string) {
      this.value = v
    },
    clickSearch(value: string) {
      console.log(value, 'show value')
    },
  },
})
</script>

<style scoped>
.blockChain {
  margin-top: 70px;
}
.chainCard {
  position: relative;
  z-index: 1;
}
.rect-block {
  /* position: absolute;
  z-index: 60;
  top: -64px;
  left: 197px;
  width: 600px;
  height: 840px;
  background: #2545cb; */
}
</style>
