From 55cc9cc31a69e40dd038fe28f620195d2553bc90 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 11 Mar 2023 13:28:49 +0800 Subject: [PATCH] animate-catalog --- themes/fukasawa/components/Catalog.js | 2 +- themes/hexo/components/Catalog.js | 2 +- themes/matery/components/Catalog.js | 2 +- themes/medium/components/Catalog.js | 2 +- themes/next/components/Toc.js | 2 +- themes/simple/components/Catalog.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/themes/fukasawa/components/Catalog.js b/themes/fukasawa/components/Catalog.js index 500fa909..446a3e7b 100644 --- a/themes/fukasawa/components/Catalog.js +++ b/themes/fukasawa/components/Catalog.js @@ -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 diff --git a/themes/hexo/components/Catalog.js b/themes/hexo/components/Catalog.js index 3252f2ec..1e7d5b40 100644 --- a/themes/hexo/components/Catalog.js +++ b/themes/hexo/components/Catalog.js @@ -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 diff --git a/themes/matery/components/Catalog.js b/themes/matery/components/Catalog.js index a86326e3..56bff03e 100644 --- a/themes/matery/components/Catalog.js +++ b/themes/matery/components/Catalog.js @@ -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 diff --git a/themes/medium/components/Catalog.js b/themes/medium/components/Catalog.js index 11b8cae0..7e394ec3 100644 --- a/themes/medium/components/Catalog.js +++ b/themes/medium/components/Catalog.js @@ -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 diff --git a/themes/next/components/Toc.js b/themes/next/components/Toc.js index 6d98ee4a..f734990d 100644 --- a/themes/next/components/Toc.js +++ b/themes/next/components/Toc.js @@ -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 diff --git a/themes/simple/components/Catalog.js b/themes/simple/components/Catalog.js index b267a8b2..1afa2f51 100644 --- a/themes/simple/components/Catalog.js +++ b/themes/simple/components/Catalog.js @@ -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