返回 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'
12 ? official
13 : community)
14 </script>
15
16 <template>
17 <div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
18 <ThemeInfo v-for="theme of themes" :key="theme.id" :theme="theme" />
19 </div>
20 </template>
21
21 lines Plain Text