From 05a3082676073e273fca688e7ae9c75e1e70b214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E8=99=B9=E5=B7=9D=E9=A3=B4?= Date: Sat, 6 Nov 2021 22:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20issues=20#1019?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/library.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/library.vue b/src/views/library.vue index 2b4de54..693b1da 100644 --- a/src/views/library.vue +++ b/src/views/library.vue @@ -286,8 +286,15 @@ export default { getLyric( this.liked.songs[randomNum(0, this.liked.songs.length - 1)] ).then(data => { - console.log(data + '歌词接口似乎会无限挂起'); - // if (data.lrc !== undefined) this.lyric = data.lrc.lyric; + if (data.lrc !== undefined) { + let ifl = data.lrc.lyric.split('\n').filter(l => { + if (l.includes('作词')) { + this.lyric = data.lrc.lyric; + return true + ifl; + } + return false; + }); + } }); }, openAddPlaylistModal() {