diff --git a/src/components/FMCard.vue b/src/components/FMCard.vue index c78b597..1f0d28b 100644 --- a/src/components/FMCard.vue +++ b/src/components/FMCard.vue @@ -67,6 +67,11 @@ export default { )}?param=512y512`; }, }, + watch: { + track() { + this.getColor(); + }, + }, created() { this.getColor(); window.ok = this.getColor; @@ -76,11 +81,7 @@ export default { this.player.playPersonalFM(); }, next() { - this.player.playNextFMTrack().then(result => { - if (result) { - this.getColor(); - } - }); + this.player.playNextFMTrack(); }, goToAlbum() { if (this.track.album.id === 0) return; @@ -88,7 +89,6 @@ export default { }, moveToFMTrash() { this.player.moveToFMTrash(); - this.getColor(); }, getColor() { if (!this.player.personalFMTrack?.album?.picUrl) return; diff --git a/src/components/TrackList.vue b/src/components/TrackList.vue index 2b5bbb1..6743f3f 100644 --- a/src/components/TrackList.vue +++ b/src/components/TrackList.vue @@ -272,10 +272,15 @@ export default { } }, copyLink() { - navigator.clipboard.writeText( + this.$copyText( `https://music.163.com/song?id=${this.rightClickedTrack.id}` - ); - this.showToast(locale.t('toast.copied')); + ) + .then(() => { + this.showToast(locale.t('toast.copied')); + }) + .catch(err => { + this.showToast(`${locale.t('toast.copyFailed')}${err}`); + }); }, removeTrackFromQueue() { this.$store.state.player.removeTrackFromQueue( diff --git a/src/components/TrackListItem.vue b/src/components/TrackListItem.vue index c735dfd..907e884 100644 --- a/src/components/TrackListItem.vue +++ b/src/components/TrackListItem.vue @@ -33,6 +33,9 @@
{{ track.name }} + + ({{ subTitle }}) + - - ({{ subTitle }}) -