Skip to content

Commit fd6e1a2

Browse files
committed
feat: ✨ 使用第一个ai字幕作为歌词
1 parent 173c0ab commit fd6e1a2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/steps/lyrics.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ onMounted(() => {
5252
subtitles.value = _subtitles;
5353
if (fromData.playerData)
5454
fromData.playerData.subtitle.subtitles = _subtitles;
55-
console.log(_subtitles);
55+
if (_subtitles.length > 0) {
56+
const val = _subtitles[0].id_str;
57+
fromData.lyricsId = val;
58+
subtitle.value = [val];
59+
}
60+
// console.log(_subtitles);
5661
})
5762
.catch((err) => {
5863
error.value = err.message;
@@ -80,10 +85,7 @@ onMounted(() => {
8085
@change="onChange"
8186
v-else-if="fromData.playerData"
8287
>
83-
<template
84-
v-for="item in fromData.playerData.subtitle.subtitles"
85-
:key="item.id"
86-
>
88+
<template v-for="item in subtitles" :key="item.id">
8789
<a-checkbox :value="item.id_str">
8890
<template #checkbox="{ checked }">
8991
<a-space

0 commit comments

Comments
 (0)