64 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Vue
		
	
	
| <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>
 |