mirror of
https://github.com/imsyy/SPlayer.git
synced 2025-11-25 11:29:26 +08:00
fix: 修复歌词异常空行
This commit is contained in:
@@ -110,7 +110,8 @@
|
||||
<span
|
||||
class="lyric"
|
||||
:style="{ fontSize: setting.lyricsFontSize + 'vh' }"
|
||||
>{{ item.lyric }}
|
||||
>
|
||||
{{ item.lyric }}
|
||||
</span>
|
||||
<span
|
||||
v-show="
|
||||
@@ -120,7 +121,8 @@
|
||||
"
|
||||
:style="{ fontSize: setting.lyricsFontSize - 0.4 + 'vh' }"
|
||||
class="lyric-fy"
|
||||
>{{ item.lyricFy }}</span
|
||||
>
|
||||
{{ item.lyricFy }}</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,6 +59,9 @@
|
||||
:depth="3"
|
||||
v-html="
|
||||
music.getPlaySongLyric[music.getPlaySongLyricIndex].lyric
|
||||
? music.getPlaySongLyric[music.getPlaySongLyricIndex]
|
||||
.lyric
|
||||
: '暂无歌词'
|
||||
"
|
||||
/>
|
||||
</Transition>
|
||||
|
||||
@@ -18,8 +18,8 @@ const lyricFormat = (lrc) => {
|
||||
const seconds = time
|
||||
.split(":")
|
||||
.reduce((acc, cur) => acc * 60 + parseFloat(cur), 0);
|
||||
return { time: seconds, lyric: text };
|
||||
});
|
||||
return { time: seconds, lyric: text.trim() };
|
||||
}).filter((element) => element.lyric.trim() !== "");
|
||||
// 检查是否为纯音乐,是则返回空数组
|
||||
if (result.length && /纯音乐,请欣赏/.test(result[0].lyric)) {
|
||||
console.log("该歌曲为纯音乐");
|
||||
|
||||
Reference in New Issue
Block a user