mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
fix: some bugs
This commit is contained in:
parent
6c9cb56c78
commit
8c17b70f3c
8 changed files with 64 additions and 28 deletions
|
|
@ -1,8 +1,9 @@
|
|||
<template>
|
||||
<span class="artist-in-line">
|
||||
<span v-for="(ar, index) in slicedArtists" :key="ar.id">
|
||||
{{ computedPrefix }}
|
||||
<span v-for="(ar, index) in filteredArtists" :key="ar.id">
|
||||
<router-link :to="`/artist/${ar.id}`">{{ ar.name }}</router-link>
|
||||
<span v-if="index !== slicedArtists.length - 1">, </span>
|
||||
<span v-if="index !== filteredArtists.length - 1">, </span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
|
@ -15,16 +16,22 @@ export default {
|
|||
type: Array,
|
||||
required: true,
|
||||
},
|
||||
showFirstArtist: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
exclude: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
prefix: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
slicedArtists() {
|
||||
return this.showFirstArtist
|
||||
? this.artists
|
||||
: this.artists.slice(1, this.artists.length);
|
||||
filteredArtists() {
|
||||
return this.artists.filter((a) => a.name !== this.exclude);
|
||||
},
|
||||
computedPrefix() {
|
||||
if (this.filteredArtists.length !== 0) return this.prefix;
|
||||
else return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="track-list" :style="listStyles">
|
||||
<ContextMenu ref="menu">
|
||||
<div class="item-info">
|
||||
<img :src="rightClickedTrack.al.picUrl | resizeImage(512)" />
|
||||
<img :src="rightClickedTrack.al.picUrl | resizeImage(128)" />
|
||||
<div class="info">
|
||||
<div class="title">{{ rightClickedTrack.name }}</div>
|
||||
<div class="subtitle">{{ rightClickedTrack.ar[0].name }}</div>
|
||||
|
|
@ -68,6 +68,16 @@ export default {
|
|||
type: String,
|
||||
default: "default",
|
||||
},
|
||||
albumObject: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
artist: {
|
||||
name: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -34,9 +34,11 @@
|
|||
<div class="container">
|
||||
<div class="title">
|
||||
{{ track.name }}
|
||||
<span class="featured" v-if="isAlbum && track.ar.length > 1">
|
||||
-
|
||||
<ArtistsInLine :artists="track.ar" :showFirstArtist="false"
|
||||
<span class="featured" v-if="isAlbum">
|
||||
<ArtistsInLine
|
||||
:artists="track.ar"
|
||||
:exclude="this.$parent.albumObject.artist.name"
|
||||
prefix="-"
|
||||
/></span>
|
||||
<span v-if="isAlbum && track.mark === 1318912" class="explicit-symbol"
|
||||
><ExplicitSymbol
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue