将当前class的dom,滚动到可视区域
// 等待DOM更新后,将class的dom滚动到可视区域 setTimeout(() => { const activeMonthElement = document.querySelector('.month-text.active'); if (activeMonthElement) { activeMonthElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' }); } }, 0);