<template>
  <div class="browser">
    <child-view>
      <div class="sub-page">
        <div class="mx-4 py-4 border-app-blue-1 border border-solid rounded-lg bg-app-blue-4">
          <div class="">
            <h4 class="px-4 text-xl text-white">选项卡简介</h4>
            <p class="mb-0 px-4 pb-3 text-xs leading-normal border-0 border-b border-app-blue-1 border-solid">内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍内容介绍</p>
          </div>
          <div class="px-4 py-4">
            <div class="flex items-center mb-0 text-xs">
              <span class="inline-block mr-2 tracking-tight">ID:1z9e1beb62e754ff3704d8ba626d6e29f761a1c5a0</span>
              <app-icon customize size="16px" color="#FFBB00" type='icon-fuzhi'></app-icon>
            </div>
          </div>
          <p class="mb-0 px-4 opacity-60 text-xs flex items-center justify-between">
            <span>当前总票数</span>
            <span>123464654票</span>
          </p>
        </div>
        <div class="mx-4 mt-5">
          <p class="mb-3 text-sm font-medium">投票详情</p>
          <div class="border border-app-blue-1 border-solid rounded-lg overflow-hidden">
            <div class="h-9 leading-9 flex items-center justify-between text-sm bg-app-blue-4 px-3">
              <div>个人ID</div>
              <div>票数</div>
              <div>投票HASH</div>
            </div>
            <ul class="hash-list mb-0">
              <li
                v-for="(item, index) in lists"
                :key="index"
                class="leading-9 px-3 text-xs flex items-center justify-between">
                <div class="text-yellow-400">1NyER8tS...KDcL</div>
                <div>3000票</div>
                <div class="text-yellow-400">1NyER8tS...KDcL</div>
              </li>
            </ul>
          </div>
          <div>
            <x-pagination :currentPage="currentPage" :totalPage="totalPage" @handleChange="handleChange" />
          </div>
        </div>
      </div>
    </child-view>
  </div>
</template>

<script lang="ts">
import childView from '@/layouts/childView.vue'
import Vue from 'vue'
import AppIcon from '@/components/common/Icon.vue'
import { Icon } from 'vant';
import XPagination from '@/components/common/Pagination.vue'
Vue.use(Icon)
export default Vue.extend({
  components: { childView, AppIcon, XPagination },
  data() {
    return {
      currentPage: 1,
      lists: [1,2,3,4]
    }
  },
  methods: {
    handleChange() {

    }
  }
})
</script>

<style scoped>
  .hash-list li:nth-of-type(2n) {
    background: #240080;
  }
  .hash-list li:nth-of-type(2n + 1) {
    background: #0A002E;
  }
</style>