mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-07 18:07:05 +00:00
perf: 优化再次点击抖动
This commit is contained in:
parent
b64b1cd654
commit
ca4a0eb0d3
@ -510,9 +510,16 @@ export default {
|
||||
if (index > -1) {
|
||||
const el = this.$refs[`dialog_${this.dialogList[index]?.id}`]
|
||||
if (el && el[0]) {
|
||||
if (el[0].classList.contains("common-shake")) {
|
||||
return
|
||||
}
|
||||
$A.scrollIntoViewIfNeeded(el[0])
|
||||
el[0].classList.remove("common-shake")
|
||||
requestAnimationFrame(_ => el[0].classList.add("common-shake"))
|
||||
requestAnimationFrame(_ => {
|
||||
el[0].classList.add("common-shake")
|
||||
setTimeout(_ => {
|
||||
el[0].classList.remove("common-shake")
|
||||
}, 600)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user