This commit is contained in:
qinhaoyan 2024-10-25 18:02:58 +08:00
parent 1673f76842
commit 8f70ab8d8a

View File

@ -86,6 +86,9 @@ export class AnchorNav extends React.Component<AnchorNavProps> {
this.sections.forEach(item => {
this.observer.observe(item.element);
});
if (this.props.active) {
this.scrollToSection(this.props.active);
}
}
componentWillUnmount() {