mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-18 23:16:49 +00:00
右下角悬浮按钮调整
This commit is contained in:
@@ -20,9 +20,8 @@ const JumpToTopButton = ({ showPercent = false }) => {
|
||||
const { locale } = useGlobal()
|
||||
const [show, switchShow] = useState(false)
|
||||
const [percent, changePercent] = useState(0)
|
||||
const targetRef = typeof window !== 'undefined' ? document.getElementById('wrapper') : undefined
|
||||
const scrollListener = () => {
|
||||
// 处理是否显示回到顶部按钮
|
||||
const targetRef = document.getElementById('wrapper')
|
||||
const clientHeight = targetRef?.clientHeight
|
||||
const scrollY = window.pageYOffset
|
||||
const fullHeight = clientHeight - window.outerHeight
|
||||
|
||||
Reference in New Issue
Block a user