React滚动条组件react-custom-scrollbars及自定义回到顶部动画
const scrollbar = useRef(null); // or this.scrollbar = React.createRef(); if you're not using hooks
scrollbar.current.view.scroll({
top: 0,
behavior: 'smooth',
});
React滚动条组件react-custom-scrollbars