ProjectCard.vue 993 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <Card title="项目" v-bind="$attrs">
  3. <template #extra>
  4. <a-button type="link" size="small">更多</a-button>
  5. </template>
  6. <CardGrid v-for="item in items" :key="item.title" class="!md:w-1/3 !w-full">
  7. <span class="flex">
  8. <Icon :icon="item.icon" :color="item.color" size="30" />
  9. <span class="text-lg ml-4">{{ item.title }}</span>
  10. </span>
  11. <div class="flex mt-2 h-10 text-secondary">{{ item.desc }}</div>
  12. <div class="flex justify-between text-secondary">
  13. <span>{{ item.group }}</span>
  14. <span>{{ item.date }}</span>
  15. </div>
  16. </CardGrid>
  17. </Card>
  18. </template>
  19. <script lang="ts">
  20. import { defineComponent } from 'vue';
  21. import { Card, CardGrid } from 'ant-design-vue';
  22. import { Icon } from '/@/components/Icon';
  23. import { groupItems } from './data';
  24. export default defineComponent({
  25. components: { Card, CardGrid, Icon },
  26. setup() {
  27. return { items: groupItems };
  28. },
  29. });
  30. </script>