按照网上的方法不生效
let timer = setTimeout(() => {
const dom = document.getElementsByClassName('ant-modal-body');
dom[0].scrollIntoView();
console.log(dom[0]);
clearTimeout(timer);
}, 1500);
又搜到了另一种方法 生效了
const dom = document.getElementsByClassName('ant-modal-body');
dom[0].scrollTo({
top: 0
});