This repository has been archived on 2026-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
portal-test/src/components/CardViews.vue
Starlight-0208 8e39e66ce8 finish
2025-10-15 20:14:29 +08:00

35 lines
922 B
Vue

<template>
<div class="cards-container" id="cards-container">
<!-- 卡片将通过JavaScript动态生成 -->
<LinkCardItem
v-for="it in props.portalData"
:key="it.id"
:title="it.title"
:description="it.description"
:visits="it.visits"
:network-name="it.networkName"
:badge-name="it.network"
/>
</div>
</template>
<script setup lang="ts">
import { type CardItem } from '@/types/CardItems';
import LinkCardItem from './LinkCardItem.vue';
// 模拟数据
const props = withDefaults(defineProps<{
portalData: Array<CardItem>
}>(), {
portalData: () => []
})
</script>
<style scoped>
.cards-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 50px;
/* row-gap: 80px; */
}
</style>