forked from github/dataease
Merge pull request #12785 from dataease/pr@dev-v2@refactor_table_scroll_suspend
refactor(图表): 表格滚动到底部后停留 1.5 秒再回到顶部 #12677
This commit is contained in:
commit
2c941b7eb9
@ -233,7 +233,10 @@ const mouseLeave = () => {
|
||||
initScroll()
|
||||
}
|
||||
|
||||
let scrollTimer
|
||||
const initScroll = () => {
|
||||
scrollTimer && clearTimeout(scrollTimer)
|
||||
scrollTimer = setTimeout(() => {
|
||||
// 首先回到最顶部,然后计算行高*行数作为top,最后判断:如果top<数据量*行高,继续滚动,否则回到顶部
|
||||
const customAttr = actualChart?.customAttr
|
||||
const senior = actualChart?.senior
|
||||
@ -279,6 +282,7 @@ const initScroll = () => {
|
||||
initScroll
|
||||
)
|
||||
}
|
||||
}, 1500)
|
||||
}
|
||||
|
||||
const showPage = computed(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user