<template>
  <div class="shuffle">
    <div class="top">
      <div class="left">{{nameObj.name}}</div>
      <div class="right">{{nameObj.value}}</div>
    </div>
    <div class="list">
      <div class="item" v-for="(item, index) in list" :key="index">
        <div class="left">{{item.dataKey}}</div>
        <div class="right">{{item.dataCount}}</div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
  import { ref } from 'vue';
  const props = defineProps({
    loading: Boolean,
    list: Array,
    nameObj: Object,
  });
</script>
<style lang="less" scoped>
  .fiexDiv {
    display: flex;
    justify-content: space-between;
  }
  .shuffle {
    margin-top: 15px;
    line-height: 30px;
    .top {
      .fiexDiv;
    }
    .list {

      .item {
        .fiexDiv;
        &:nth-child(1){
                color: #f14646;
            }
        &:nth-child(2){
                color: plum;
            }
        &:nth-child(3){
                color: #e1a925;
            }
      }

    }
    .right {
      min-width: 30px;
      text-align: left;
    }
  }
</style>
