fix: empty artist link (#705)

This commit is contained in:
memorydream 2021-05-26 16:46:50 +08:00 committed by GitHub
parent e233aa9f1d
commit 5869f889f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -2,7 +2,10 @@
<span class="artist-in-line">
{{ computedPrefix }}
<span v-for="(ar, index) in filteredArtists" :key="ar.id">
<router-link :to="`/artist/${ar.id}`">{{ ar.name }}</router-link>
<router-link v-if="ar.id !== 0" :to="`/artist/${ar.id}`">
{{ ar.name }}
</router-link>
<span v-else>{{ ar.name }}</span>
<span v-if="index !== filteredArtists.length - 1">, </span>
</span>
</span>

View File

@ -37,9 +37,9 @@
<span
v-for="(ar, index) in currentTrack.ar"
:key="ar.id"
@click="goToArtist(ar.id)"
@click="ar.id !== 0 && goToArtist(ar.id)"
>
<span class="ar">{{ ar.name }}</span
<span :class="ar.id !== 0 ? 'ar' : ''"> {{ ar.name }} </span
><span v-if="index !== currentTrack.ar.length - 1">, </span>
</span>
</div>