JavaScript 需要滚动到页面顶部

78 阅读1分钟

在JavaScript中触发滚动:

在新页面的 componentDidMount() 中加入

window.scrollTo(0, 0);