Commit 65678b26 by FE

scroll in search-result

parent 45a3d2c5
......@@ -78,6 +78,7 @@ class SearchResult extends PureComponent {
handleScroll = throttle(() => {
let y = window.scrollY,
headY = this.searchHead.current.offsetTop;
// console.log(y);
if (y < this.prevScrollY && y > 0) {
if (this.state.swipeDirection === this.swipeDown) {
......@@ -96,7 +97,8 @@ class SearchResult extends PureComponent {
if (this.state.swipeDirection === this.swipeDown) {
this.setState({
searchHeadStyle: {
top: `${y > headY ? y - 44 : y}px`
// top: `${y > headY ? y - 44 : y}px`
top: `${y}px`
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment