优化歌词在短时间内快速播放时的滚动效果
This commit is contained in:
@@ -35,10 +35,6 @@ export default (isComputeHeight) => {
|
||||
|
||||
const handleScrollLrc = (duration = 300) => {
|
||||
if (!dom_lines?.length || !dom_lyric.value) return
|
||||
if (cancelScrollFn) {
|
||||
cancelScrollFn()
|
||||
cancelScrollFn = null
|
||||
}
|
||||
if (isStopScroll) return
|
||||
let dom_p = dom_lines[lyric.line]
|
||||
|
||||
@@ -161,10 +157,6 @@ export default (isComputeHeight) => {
|
||||
if (lines.length) {
|
||||
setLyric(lines)
|
||||
} else {
|
||||
if (cancelScrollFn) {
|
||||
cancelScrollFn()
|
||||
cancelScrollFn = null
|
||||
}
|
||||
cancelScrollFn = scrollTo(dom_lyric.value, 0, 300, () => {
|
||||
if (lyric.lines !== lines) return
|
||||
setLyric(lines)
|
||||
|
||||
@@ -35,10 +35,6 @@ export default (isComputeWidth) => {
|
||||
|
||||
const handleScrollLrc = (duration = 300) => {
|
||||
if (!dom_lines?.length || !dom_lyric.value) return
|
||||
if (cancelScrollFn) {
|
||||
cancelScrollFn()
|
||||
cancelScrollFn = null
|
||||
}
|
||||
if (isStopScroll) return
|
||||
let dom_p = dom_lines[lyric.line]
|
||||
|
||||
@@ -161,10 +157,6 @@ export default (isComputeWidth) => {
|
||||
if (lines.length) {
|
||||
setLyric(lines)
|
||||
} else {
|
||||
if (cancelScrollFn) {
|
||||
cancelScrollFn()
|
||||
cancelScrollFn = null
|
||||
}
|
||||
cancelScrollFn = scrollXRTo(dom_lyric.value, 0, 300, () => {
|
||||
if (lyric.lines !== lines) return
|
||||
setLyric(lines)
|
||||
|
||||
Reference in New Issue
Block a user