2.20 滚动速度快了,chrome可以滚动了

This commit is contained in:
jl-zhoujl2
2023-02-20 16:12:43 +08:00
parent c8b315b0d9
commit b028f8643b

View File

@ -487,7 +487,7 @@ export const ScrollTable = (props: { dataSource: any[], columns: any[], ynum?: n
// 只有当大于10条数据的时候 才会看起滚动 // 只有当大于10条数据的时候 才会看起滚动
const v = document.getElementsByClassName("ant-table-body")[tableKey]; const v = document.getElementsByClassName("ant-table-body")[tableKey];
timer.current = setInterval(() => { timer.current = setInterval(() => {
v.scrollTop += 0.5; v.scrollTop += 1;
if ( if (
Math.ceil(v.scrollTop) >= parseFloat((v.scrollHeight - v.clientHeight).toString()) Math.ceil(v.scrollTop) >= parseFloat((v.scrollHeight - v.clientHeight).toString())
) { ) {