mirror of
https://github.com/koel/koel
synced 2024-12-21 10:03:10 +00:00
27 lines
543 B
Vue
27 lines
543 B
Vue
|
<template>
|
||
|
<div :class="`as-${viewMode}`" class="grid gap-5 p-6">
|
||
|
<slot />
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script setup lang="ts">
|
||
|
import { toRefs } from 'vue'
|
||
|
|
||
|
const props = withDefaults(defineProps<{ viewMode?: ArtistAlbumViewMode }>(), {
|
||
|
viewMode: 'thumbnails'
|
||
|
})
|
||
|
|
||
|
const { viewMode } = toRefs(props)
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="postcss">
|
||
|
div {
|
||
|
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||
|
}
|
||
|
|
||
|
div.as-list {
|
||
|
@apply gap-x-4 gap-y-3 content-start;
|
||
|
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
|
||
|
}
|
||
|
</style>
|