Files
workspace/code/base-project/base-vue/src/App.vue
T
2025-09-24 17:31:14 +08:00

36 lines
801 B
Vue

<script setup lang="ts">
const items = Array.from({ length: 10 }, (_, i) => ({
prefix: `图标${i + 1}`,
content: `这是内容${i + 1}`,
suffix: `操作${i + 1}`,
}))
</script>
<template>
<div class="main">
<AList header="列表 Header" footer="列表 Footer" style="width: 1000px;height:400px">
<AListItem v-for="(item, index) in items" :key="index">
<template #prefix>
{{ item.prefix }}
</template>
{{ item.content }}
<template #suffix>
{{ item.suffix }}
</template>
</AListItem>
</AList>
</div>
</template>
<style lang="scss" scoped>
.main {
height: 800px;
display: flex;
align-items: center;
justify-content: center;
background-color: #eeeeee;
flex-direction: column;
gap: 16px;
}
</style>