GrowCard.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div class="md:flex x-scroll myGrowCard" style="overflow: auto">
  3. <template v-for="(item, index) in list" :key="item.title">
  4. <Card
  5. size="small"
  6. :title="item.nameCn"
  7. class="md:w-1/4 w-full !md:mt-0 !mt-4"
  8. :class="[index != list.length && '!md:mr-4']"
  9. style="min-width: 160px"
  10. :canExpan="false"
  11. >
  12. <div class="py-4 px-4 flex justify-between">
  13. <div class="" v-if="!item.score">无</div>
  14. <CountTo v-else prefix="分" :startVal="1" :endVal="item.score" class="text-2xl" />
  15. </div>
  16. </Card>
  17. </template>
  18. </div>
  19. </template>
  20. <script lang="ts" setup>
  21. import { CountTo } from '/@/components/CountTo/index';
  22. import { Icon } from '/@/components/Icon';
  23. import { Tag, Card } from 'ant-design-vue';
  24. import { growCardList, GrowCardItem } from '../data';
  25. defineProps({
  26. loading: {
  27. type: Boolean,
  28. },
  29. list: {
  30. type: Array as PropType<Array<GrowCardItem>>,
  31. default: [],
  32. },
  33. });
  34. </script>
  35. <style lang="less" scoped>
  36. .myGrowCard::-webkit-scrollbar {
  37. // display: none;
  38. }
  39. .myGrowCard {
  40. padding-bottom: 5px;
  41. }
  42. </style>