DynamicInfo.vue 1.2 KB
Newer Older
V
Vben 已提交
1 2 3 4 5 6 7 8 9 10 11 12
<template>
  <Card title="最新动态" v-bind="$attrs">
    <template #extra>
      <a-button type="link" size="small">更多</a-button>
    </template>
    <List item-layout="horizontal" :data-source="items">
      <template #renderItem="{ item }">
        <ListItem>
          <ListItemMeta>
            <template #description>
              {{ item.date }}
            </template>
V
Vben 已提交
13
            <!-- eslint-disable-next-line -->
V
Vben 已提交
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
            <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>
<script lang="ts">
  import { defineComponent } from 'vue';

  import { Card, List } from 'ant-design-vue';
  import { dynamicInfoItems } from './data';
  import headerImg from '/@/assets/images/header.jpg';
  import { Icon } from '/@/components/Icon';

  export default defineComponent({
    components: { Card, List, ListItem: List.Item, ListItemMeta: List.Item.Meta, Icon },
    setup() {
      return { items: dynamicInfoItems, headerImg };
    },
  });
</script>