fix: some bugs

This commit is contained in:
qier222 2020-10-23 20:11:19 +08:00
parent ce228e1243
commit 67db925bfe
3 changed files with 28 additions and 9 deletions

View file

@ -97,10 +97,17 @@ export default {
return new Date(item.publishTime).getFullYear();
if (this.subText === "artist")
return `<a href="/#/artist/${item.artist.id}">${item.artist.name}</a>`;
if (this.subText === "albumType+releaseYear")
return `${item.size === 1 ? "Single" : "EP"} · ${new Date(
item.publishTime
).getFullYear()}`;
if (this.subText === "albumType+releaseYear") {
let albumType = item.type;
if (item.type === "EP/Single") {
albumType = item.size === 1 ? "Single" : "EP";
} else if (item.type === "Single") {
albumType = "Single";
} else if (item.type === "专辑") {
albumType = "Album";
}
return `${albumType} · ${new Date(item.publishTime).getFullYear()}`;
}
if (this.subText === "appleMusic") return "by Apple Music";
},
},