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