Skip to content

Commit 5f9300b

Browse files
committed
🐞 fix: 修改注释位置
1 parent 4a2b74b commit 5f9300b

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

src/components/Player/PlayerLyric/AMLyric.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ import { LyricLineMouseEvent, type LyricLine } from "@applemusic-like-lyrics/cor
5454
import { useMusicStore, useSettingStore, useStatusStore } from "@/stores";
5555
import { getLyricLanguage } from "@/utils/format";
5656
import { usePlayerController } from "@/core/player/PlayerController";
57-
58-
// 此处cloneDeep 删除会暴毙 不要动
59-
6057
import { cloneDeep } from "lodash-es";
6158
import { lyricLangFontStyle } from "@/utils/lyricFontConfig";
6259
@@ -78,31 +75,24 @@ const lyricPlayerRef = ref<any | null>(null);
7875
const amLyricsData = computed(() => {
7976
const { songLyric } = musicStore;
8077
if (!songLyric) return [];
81-
8278
// 优先使用逐字歌词(YRC/TTML)
8379
const useYrc = songLyric.yrcData?.length && settingStore.showYrc;
8480
const lyrics = useYrc ? songLyric.yrcData : songLyric.lrcData;
85-
8681
// 简单检查歌词有效性
8782
if (!Array.isArray(lyrics) || lyrics.length === 0) return [];
88-
83+
// 此处cloneDeep 删除会暴毙 不要动
8984
const clonedLyrics = cloneDeep(lyrics) as LyricLine[];
90-
9185
// 检查是否要不显示某一部分并删去
9286
const showTran = settingStore.showTran;
9387
const showRoma = settingStore.showRoma;
9488
const showWordsRoma = settingStore.showWordsRoma;
95-
9689
if (!showTran || !showRoma || !showWordsRoma) {
9790
clonedLyrics.forEach((line) => {
9891
if (!showTran) line.translatedLyric = "";
9992
if (!showRoma) line.romanLyric = "";
10093
if (!showWordsRoma) line.words.forEach((word) => (word.romanWord = ""));
10194
});
10295
}
103-
104-
105-
10696
// 调换翻译与音译位置
10797
if (settingStore.swapTranRoma) {
10898
clonedLyrics.forEach((line) => {
@@ -111,14 +101,12 @@ const amLyricsData = computed(() => {
111101
line.romanLyric = temp;
112102
});
113103
}
114-
115104
// 如果开启了歌词靠右,反转 isDuet
116105
if (settingStore.lyricAlignRight) {
117106
clonedLyrics.forEach((line) => {
118107
line.isDuet = !line.isDuet;
119108
});
120109
}
121-
122110
return clonedLyrics;
123111
});
124112

0 commit comments

Comments
 (0)