新增桌面歌词是否延迟滚动设置

This commit is contained in:
lyswhut
2022-01-16 20:00:22 +08:00
parent dbb7f0c683
commit 53078f79a6
9 changed files with 20 additions and 5 deletions
+1
View File
@@ -33,6 +33,7 @@ export default {
enable: false,
isLock: true,
isAlwaysOnTop: false,
isDelayScroll: true,
width: 600,
height: 700,
x: -1,
+9 -4
View File
@@ -22,6 +22,7 @@ export default {
type: Object,
default() {
return {
isDelayScroll: true,
style: {
font: '',
fontSize: 125,
@@ -127,10 +128,14 @@ export default {
if (n < 0) return
if (n == 0 && this.isSetedLines) return this.isSetedLines = false
if (o == null || n - o != 1) return this.handleScrollLrc()
delayScrollTimeout = setTimeout(() => {
delayScrollTimeout = null
this.handleScrollLrc(600)
}, 600)
if (this.lrcConfig.isDelayScroll) {
delayScrollTimeout = setTimeout(() => {
delayScrollTimeout = null
this.handleScrollLrc(600)
}, 600)
} else {
this.handleScrollLrc()
}
},
immediate: true,
},