mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-06-07 11:45:35 +00:00
55 lines
1.1 KiB
Vue
55 lines
1.1 KiB
Vue
<template>
|
|
<div
|
|
style="width: fit-content"
|
|
v-tooltip
|
|
class="artistname ellip"
|
|
:style="{
|
|
width: 'fit-content',
|
|
fontSize: small ? '0.85rem' : smaller ? 'small' : '',
|
|
}"
|
|
@click.stop="() => {}"
|
|
>
|
|
<div v-if="artists === null || artists.length === 0">
|
|
<span>{{ albumartists }}</span>
|
|
</div>
|
|
<div v-else>
|
|
<template v-for="(artist, index) in artists" :key="artist.artisthash">
|
|
<RouterLink
|
|
class="artist"
|
|
:to="{
|
|
name: Routes.artist,
|
|
params: { hash: artist.artisthash },
|
|
}"
|
|
>{{ `${artist.name}` }}</RouterLink
|
|
>
|
|
{{ index === artists.length - 1 ? "" : ", " }}
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { Artist } from "@/interfaces";
|
|
import { Routes } from "@/router/routes";
|
|
|
|
const props = defineProps<{
|
|
artists: Artist[] | null;
|
|
albumartists: string | null;
|
|
small?: boolean;
|
|
smaller?: boolean;
|
|
}>();
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.artistname {
|
|
a {
|
|
color: inherit;
|
|
cursor: pointer !important;
|
|
|
|
&:hover {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
}
|
|
</style>
|