CN-430 fix: 修复卡死报递归错误的问题

This commit is contained in:
chenjinsong
2022-04-14 14:36:12 +08:00
parent 5baf123056
commit 58e2d233d6
2 changed files with 14 additions and 8 deletions

View File

@@ -191,7 +191,6 @@ export default {
this.scroll.prevent = true
const clientHeight = e.target.clientHeight
const currentScrollTop = e.target.scrollTop
console.info(this.scroll.prevScrollTop, currentScrollTop)
if (currentScrollTop > this.scroll.prevScrollTop) {
// 向下滚动若top在clientHeight内则整屏滚动下去
this.scroll.prevScrollTop = currentScrollTop
@@ -205,11 +204,9 @@ export default {
// 向上滚动若top在clientHeight内则滚动到最顶部
this.scroll.prevScrollTop = currentScrollTop
if (currentScrollTop < clientHeight) {
// console.info('up', this.scroll.prevScrollTop, currentScrollTop)
scrollToTop(e.target, 0, 200, 'up')
setTimeout(() => {
this.scroll.prevScrollTop = e.target.scrollTop
// console.info('up2', this.scroll.prevScrollTop, currentScrollTop)
}, 210)
}
}