💅 加入DaoVoice,调整目录位置

This commit is contained in:
tangly1024
2021-09-29 12:52:24 +08:00
parent 5b4df90c97
commit 84137cef6f
12 changed files with 130 additions and 86 deletions

View File

@@ -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)