DynamicInfo.vue 987 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <Card title="最新动态" v-bind="$attrs">
  3. <template #extra>
  4. <a-button type="link" size="small">更多</a-button>
  5. </template>
  6. <List item-layout="horizontal" :data-source="dynamicInfoItems">
  7. <template #renderItem="{ item }">
  8. <ListItem>
  9. <ListItemMeta>
  10. <template #description>
  11. {{ item.date }}
  12. </template>
  13. <!-- eslint-disable-next-line -->
  14. <template #title> {{ item.name }} <span v-html="item.desc"> </span> </template>
  15. <template #avatar>
  16. <Icon :icon="item.avatar" :size="30" />
  17. </template>
  18. </ListItemMeta>
  19. </ListItem>
  20. </template>
  21. </List>
  22. </Card>
  23. </template>
  24. <script lang="ts" setup>
  25. import { Card, List } from 'ant-design-vue';
  26. import { dynamicInfoItems } from './data';
  27. import Icon from '@/components/Icon/Icon.vue';
  28. const ListItem = List.Item;
  29. const ListItemMeta = List.Item.Meta;
  30. </script>