返回 slidev
ThemeGallery.vue
根目录 / docs / .vitepress / theme / components / ThemeGallery.vue
1 <script setup lang="ts">
2 import { computed } from 'vue'
3 import { community, official } from '../../themes'
4
5 const props = defineProps({
6 collection: {
7 default: 'official',
8 },
9 })
10
11 const themes = computed(() => props.collection === 'official' ? official : community)
12 </script>
13
14 <template>
15 <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
16 <ThemeInfo v-for="theme of themes" :key="theme.id" :theme="theme" />
17 </div>
18 </template>
19
19 lines Plain Text