优化歌词滚动

pull/1583/head
lyswhut 2023-09-03 18:08:10 +08:00
parent 3381ad0e0e
commit 3ca8f09971
3 changed files with 1 additions and 9 deletions

View File

@ -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(() => {

View File

@ -197,9 +197,6 @@ export default (isComputeWidth) => {
document.addEventListener('touchend', handleMouseMsUp)
initLrc(lyric.lines, null)
nextTick(() => {
scrollLine(lyric.line)
})
})
onBeforeUnmount(() => {

View File

@ -208,9 +208,6 @@ export default ({ isPlay, lyric, playProgress, isShowLyricProgressSetting, offse
document.addEventListener('touchend', handleMouseMsUp)
initLrc(lyric.lines, null)
nextTick(() => {
scrollLine(lyric.line)
})
})
onBeforeUnmount(() => {