animate-catalog

This commit is contained in:
tangly1024
2023-03-11 13:28:49 +08:00
parent 67e30410bc
commit 55cc9cc31a
6 changed files with 6 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ const Catalog = ({ toc }) => {
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null

View File

@@ -28,7 +28,7 @@ const Catalog = ({ toc }) => {
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null

View File

@@ -27,7 +27,7 @@ const Catalog = ({ toc }) => {
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null

View File

@@ -26,7 +26,7 @@ const Catalog = ({ toc }) => {
}
}, [])
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null

View File

@@ -26,7 +26,7 @@ const Toc = ({ toc }) => {
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null

View File

@@ -26,7 +26,7 @@ const Catalog = ({ post }) => {
// 同步选中目录事件
const [activeSection, setActiveSection] = React.useState(null)
const throttleMs = 100
const throttleMs = 200
const actionSectionScrollSpy = React.useCallback(throttle(() => {
const sections = document.getElementsByClassName('notion-h')
let prevBBox = null