优化歌词滚动
parent
3381ad0e0e
commit
3ca8f09971
|
@ -169,6 +169,7 @@ export default (isComputeHeight) => {
|
||||||
|
|
||||||
let delayScrollTimeout
|
let delayScrollTimeout
|
||||||
const scrollLine = (line, oldLine) => {
|
const scrollLine = (line, oldLine) => {
|
||||||
|
console.log('scrollLine', line, oldLine)
|
||||||
setImmediate(() => {
|
setImmediate(() => {
|
||||||
prevActiveLine = line
|
prevActiveLine = line
|
||||||
})
|
})
|
||||||
|
@ -197,9 +198,6 @@ export default (isComputeHeight) => {
|
||||||
document.addEventListener('touchend', handleMouseMsUp)
|
document.addEventListener('touchend', handleMouseMsUp)
|
||||||
|
|
||||||
initLrc(lyric.lines, null)
|
initLrc(lyric.lines, null)
|
||||||
nextTick(() => {
|
|
||||||
scrollLine(lyric.line)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|
|
@ -197,9 +197,6 @@ export default (isComputeWidth) => {
|
||||||
document.addEventListener('touchend', handleMouseMsUp)
|
document.addEventListener('touchend', handleMouseMsUp)
|
||||||
|
|
||||||
initLrc(lyric.lines, null)
|
initLrc(lyric.lines, null)
|
||||||
nextTick(() => {
|
|
||||||
scrollLine(lyric.line)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|
|
@ -208,9 +208,6 @@ export default ({ isPlay, lyric, playProgress, isShowLyricProgressSetting, offse
|
||||||
document.addEventListener('touchend', handleMouseMsUp)
|
document.addEventListener('touchend', handleMouseMsUp)
|
||||||
|
|
||||||
initLrc(lyric.lines, null)
|
initLrc(lyric.lines, null)
|
||||||
nextTick(() => {
|
|
||||||
scrollLine(lyric.line)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
|
|
Loading…
Reference in New Issue