From 1f1a041f6fcc859abf53fad57bf0185c34b63c12 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 4 Jul 2019 15:49:15 +0800 Subject: [PATCH] scroll --- public/react/src/App.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/react/src/App.js b/public/react/src/App.js index 15105f749..85267a4e6 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -224,7 +224,11 @@ class App extends Component { componentDidMount() { // force an update if the URL changes - history.listen(() => this.forceUpdate()); + history.listen(() => { + this.forceUpdate() + const $ = window.$ + $("html").animate({ scrollTop: $('html').scrollTop() - 0 }) + }); initAxiosInterceptors(this.props)