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