From 9790bae43be6c45f15191e74c8ef79dff7a7762b Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Fri, 5 Jul 2024 09:50:21 +0800 Subject: [PATCH] =?UTF-8?q?gitbook=20=E6=B7=BB=E5=8A=A0=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/gitbook/components/Catalog.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/themes/gitbook/components/Catalog.js b/themes/gitbook/components/Catalog.js index fde3b9f2..90f5111d 100644 --- a/themes/gitbook/components/Catalog.js +++ b/themes/gitbook/components/Catalog.js @@ -1,3 +1,4 @@ +import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import throttle from 'lodash.throttle' import { uuidToId } from 'notion-utils' @@ -13,6 +14,7 @@ const Catalog = ({ post }) => { const toc = post?.toc // 同步选中目录事件 const [activeSection, setActiveSection] = useState(null) + const {locale}= useGlobal() // 监听滚动事件 useEffect(() => { @@ -67,6 +69,7 @@ const Catalog = ({ post }) => { return ( <> +
{locale.COMMON.TABLE_OF_CONTENTS}