GrowCard.vue 1019 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <div class="md:flex">
  3. <template v-for="(item, index) in list" :key="item.title">
  4. <Card
  5. size="small"
  6. :loading="loading"
  7. :title="item.nameCn"
  8. class="md:w-1/4 w-full !md:mt-0 !mt-4"
  9. :class="[index != list.length && '!md:mr-4']"
  10. :canExpan="false"
  11. >
  12. <div class="py-4 px-4 flex justify-between">
  13. <div class="" v-if="item.score == '暂无评分' || item.score == 0">无</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>