mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
bugfix:jump-to-top被遮盖
This commit is contained in:
@@ -20,6 +20,7 @@ const JumpToTop = ({ targetRef, showPercent = true }) => {
|
||||
const scrollY = window.pageYOffset
|
||||
const fullHeight = clientHeight - window.outerHeight
|
||||
const shouldShow = scrollY > 100
|
||||
console.log(clientHeight, scrollY, fullHeight, shouldShow)
|
||||
if (shouldShow !== show) {
|
||||
switchShow(shouldShow)
|
||||
}
|
||||
@@ -33,7 +34,7 @@ const JumpToTop = ({ targetRef, showPercent = true }) => {
|
||||
}, [show])
|
||||
|
||||
return (
|
||||
<div className='right-0 space-x-2 fixed flex bottom-24 px-5 py-1 duration-500'>
|
||||
<div id='jump-to-top' className='right-0 space-x-2 fixed flex bottom-24 px-5 py-1 duration-500 z-20'>
|
||||
<div className='flex-wrap transform hover:scale-125 duration-200 '>
|
||||
<div
|
||||
onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })}
|
||||
|
||||
Reference in New Issue
Block a user