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"
|
2022-05-03 16:51:59 +00:00
|
|
|
data-testid="album-track-item"
|
2022-04-15 14:24:30 +00:00
|
|
|
/>
|
|
|
|
</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>
|