1. 业务场景:
可编辑表格,新增编辑项后滚动条滚动到底部看到最后一项新增数据。
2. 方法
const ht = document.getElementsByClassName("ag-body-viewport ag-layout-normal ag-row-no-animation")
ht.forEach((item) => {
item.scroll({
top: item.scrollHeight,
left: 0,
behavior: "smooth" //滚动条平滑滚动
});
})