koel/resources/assets/js/components/album/AlbumTrackList.vue

39 lines
727 B
Vue
Raw Normal View History

2022-04-15 14:24:30 +00:00
<template>
<section class="track-listing">
<h1>Track Listing</h1>
<ul class="tracks">
<li
2022-04-21 10:43:10 +00:00
is="vue:TrackListItem"
2022-04-29 18:26:07 +00:00
v-for="(track, index) in album.info?.tracks"
2022-04-21 10:43:10 +00:00
:key="index"
2022-04-15 14:24:30 +00:00
:album="album"
:track="track"
/>
</ul>
</section>
</template>
2022-04-15 17:00:08 +00:00
<script lang="ts" setup>
import { defineAsyncComponent, toRefs } from 'vue'
2022-04-15 14:24:30 +00:00
2022-04-21 10:43:10 +00:00
const TrackListItem = defineAsyncComponent(() => import('./AlbumTrackListItem.vue'))
2022-04-15 14:24:30 +00:00
2022-04-15 17:00:08 +00:00
const props = defineProps<{ album: Album }>()
const { album } = toRefs(props)
2022-04-15 14:24:30 +00:00
</script>
2022-04-21 10:43:10 +00:00
<style lang="scss" scoped>
ul {
counter-reset: trackCounter;
}
li {
counter-increment: trackCounter;
&::before {
content: counter(trackCounter);
}
}
</style>