From 3ca8f09971bab43993a4dd5e681138c06e898c85 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sun, 3 Sep 2023 18:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=AD=8C=E8=AF=8D=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/layout/LyricHorizontal/useLyric.js | 4 +--- .../components/layout/LyricVertical/useLyric.js | 3 --- src/renderer/utils/compositions/useLyric.js | 3 --- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/renderer-lyric/components/layout/LyricHorizontal/useLyric.js b/src/renderer-lyric/components/layout/LyricHorizontal/useLyric.js index 2213b34a..cae767af 100644 --- a/src/renderer-lyric/components/layout/LyricHorizontal/useLyric.js +++ b/src/renderer-lyric/components/layout/LyricHorizontal/useLyric.js @@ -169,6 +169,7 @@ export default (isComputeHeight) => { let delayScrollTimeout const scrollLine = (line, oldLine) => { + console.log('scrollLine', line, oldLine) setImmediate(() => { prevActiveLine = line }) @@ -197,9 +198,6 @@ export default (isComputeHeight) => { document.addEventListener('touchend', handleMouseMsUp) initLrc(lyric.lines, null) - nextTick(() => { - scrollLine(lyric.line) - }) }) onBeforeUnmount(() => { diff --git a/src/renderer-lyric/components/layout/LyricVertical/useLyric.js b/src/renderer-lyric/components/layout/LyricVertical/useLyric.js index 6fb712df..2648ee03 100644 --- a/src/renderer-lyric/components/layout/LyricVertical/useLyric.js +++ b/src/renderer-lyric/components/layout/LyricVertical/useLyric.js @@ -197,9 +197,6 @@ export default (isComputeWidth) => { document.addEventListener('touchend', handleMouseMsUp) initLrc(lyric.lines, null) - nextTick(() => { - scrollLine(lyric.line) - }) }) onBeforeUnmount(() => { diff --git a/src/renderer/utils/compositions/useLyric.js b/src/renderer/utils/compositions/useLyric.js index 321dfd8c..8b74be5d 100644 --- a/src/renderer/utils/compositions/useLyric.js +++ b/src/renderer/utils/compositions/useLyric.js @@ -208,9 +208,6 @@ export default ({ isPlay, lyric, playProgress, isShowLyricProgressSetting, offse document.addEventListener('touchend', handleMouseMsUp) initLrc(lyric.lines, null) - nextTick(() => { - scrollLine(lyric.line) - }) }) onBeforeUnmount(() => {