From 7dad7d810a3daa49268c8f3881449e604a4ca306 Mon Sep 17 00:00:00 2001 From: memorydream <34763046+memorydream@users.noreply.github.com> Date: Sun, 6 Mar 2022 11:55:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=A4=B1=E6=95=88=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20(#1380)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Player.vue | 35 ++++++++++++++++++++++++++++------- src/views/lyrics.vue | 22 +++++++++++++++++----- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/src/components/Player.vue b/src/components/Player.vue index ff92882..6e3eec4 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -71,19 +71,19 @@ @@ -115,7 +115,7 @@ ? $t('player.repeatTrack') : $t('player.repeat') " - @click.native="player.switchRepeatMode" + @click.native="switchRepeatMode" >
- + diff --git a/src/views/lyrics.vue b/src/views/lyrics.vue index 8f1d32f..3673231 100644 --- a/src/views/lyrics.vue +++ b/src/views/lyrics.vue @@ -120,7 +120,7 @@ : $t('player.repeat') " :class="{ active: player.repeatMode !== 'off' }" - @click.native="player.switchRepeatMode" + @click.native="switchRepeatMode" > @@ -164,7 +164,7 @@ v-show="!player.isPersonalFM" :title="$t('player.shuffle')" :class="{ active: player.shuffle }" - @click.native="player.switchShuffle" + @click.native="switchShuffle" > @@ -332,6 +332,12 @@ export default { methods: { ...mapMutations(['toggleLyrics']), ...mapActions(['likeATrack']), + playPrevTrack() { + this.player.playPrevTrack(); + }, + playOrPause() { + this.player.playOrPause(); + }, playNextTrack() { if (this.player.isPersonalFM) { this.player.playNextFMTrack(); @@ -417,6 +423,12 @@ export default { moveToFMTrash() { this.player.moveToFMTrash(); }, + switchRepeatMode() { + this.player.switchRepeatMode(); + }, + switchShuffle() { + this.player.switchShuffle(); + }, getCoverColor() { if (this.settings.lyricsBackground !== true) return; const cover = this.currentTrack.al?.picUrl + '?param=1024y1024';