mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 07:26:50 +00:00
💅 加入DaoVoice,调整目录位置
This commit is contained in:
@@ -12,7 +12,7 @@ const Progress = ({ targetRef }) => {
|
||||
const scrollListener = throttle(() => {
|
||||
if (targetRef.current) {
|
||||
const fullHeight = targetRef.current.clientHeight
|
||||
const per = parseFloat(((window.scrollY / (fullHeight) * 100)).toFixed(0))
|
||||
const per = parseFloat(((window.scrollY / (fullHeight - 100) * 100)).toFixed(0))
|
||||
changePercent(per)
|
||||
}
|
||||
// console.log('滚动信息', window.scrollY, fullHeight, per)
|
||||
|
||||
Reference in New Issue
Block a user