File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ class Demo extends React.Component {
43
43
< p > Ant Motion</ p >
44
44
</ div >
45
45
< div className = "nav-wap" >
46
- < Link className = "nav-list" location = "page0" offsetTop = { - 58 }
46
+ < Link className = "nav-list" location = "page0"
47
47
onFocus = { this . onFocus . bind ( this ) }
48
48
>
49
49
Example
50
50
</ Link >
51
- < Link className = "nav-list" location = "page1" offsetTop = { - 58 }
51
+ < Link className = "nav-list" location = "page1" offsetTop = { 158 }
52
52
onFocus = { this . onFocus . bind ( this ) }
53
53
>
54
54
Example2
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ class ScrollLink extends React.Component {
45
45
const elementDom = mapped . get ( this . props . location ) ;
46
46
const elementRect = elementDom . getBoundingClientRect ( ) ;
47
47
this . scrollTop = currentScrollTop ( ) ;
48
- const toTop = Math . round ( elementRect . top ) - Math . round ( docRect . top ) + this . props . offsetTop ;
48
+ const toTop = Math . round ( elementRect . top ) - Math . round ( docRect . top ) - this . props . offsetTop ;
49
49
this . toTop = this . props . toShowHeight ?
50
50
toTop - transformArguments ( this . props . showHeightActive ) [ 0 ] : toTop ;
51
51
this . initTime = Date . now ( ) ;
You can’t perform that action at this time.
0 commit comments