You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.1 KiB
64 lines
1.1 KiB
<docs>
|
|
---
|
|
order: 0
|
|
title:
|
|
zh-CN: 基本用法
|
|
en-US: Basic usage
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
基础列表。
|
|
|
|
## en-US
|
|
|
|
Basic list.
|
|
|
|
</docs>
|
|
|
|
<template>
|
|
<a-list item-layout="horizontal" :data-source="data">
|
|
<template #renderItem="{ item }">
|
|
<a-list-item>
|
|
<a-list-item-meta
|
|
description="Ant Design, a design language for background applications, is refined by Ant UED Team"
|
|
>
|
|
<template #title>
|
|
<a href="https://www.antdv.com/">{{ item.title }}</a>
|
|
</template>
|
|
<template #avatar>
|
|
<a-avatar src="https://joeschmoe.io/api/v1/random" />
|
|
</template>
|
|
</a-list-item-meta>
|
|
</a-list-item>
|
|
</template>
|
|
</a-list>
|
|
</template>
|
|
<script lang="ts">
|
|
import { defineComponent } from 'vue';
|
|
interface DataItem {
|
|
title: string;
|
|
}
|
|
const data: DataItem[] = [
|
|
{
|
|
title: 'Ant Design Title 1',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 2',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 3',
|
|
},
|
|
{
|
|
title: 'Ant Design Title 4',
|
|
},
|
|
];
|
|
export default defineComponent({
|
|
setup() {
|
|
return {
|
|
data,
|
|
};
|
|
},
|
|
});
|
|
</script>
|