From 44121bf50bc98957d63fa0bb0037139d544cff9e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 20 Dec 2021 11:30:38 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ArticleDetail.js | 2 +- components/BlogPostListScroll.js | 2 +- components/SideArea.js | 11 ----------- components/Toc.js | 4 ++-- components/TocDrawer.js | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/components/ArticleDetail.js b/components/ArticleDetail.js index 56534a49..aeb733ee 100644 --- a/components/ArticleDetail.js +++ b/components/ArticleDetail.js @@ -44,7 +44,7 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n return (<>
{post.type && !post.type.includes('Page') && post?.page_cover && ( diff --git a/components/BlogPostListScroll.js b/components/BlogPostListScroll.js index 7b85dad3..29a86a47 100644 --- a/components/BlogPostListScroll.js +++ b/components/BlogPostListScroll.js @@ -33,7 +33,7 @@ const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory, const scrollTrigger = useCallback(throttle(() => { const scrollS = window.scrollY + window.outerHeight const clientHeight = targetRef ? (targetRef.current ? (targetRef.current.clientHeight) : 0) : 0 - if (scrollS > clientHeight + 10) { + if (scrollS > clientHeight + 100) { handleGetMore() } }, 500)) diff --git a/components/SideArea.js b/components/SideArea.js index 9d9e4473..0766d359 100644 --- a/components/SideArea.js +++ b/components/SideArea.js @@ -52,17 +52,6 @@ const SideArea = ({ title, tags, currentTag, post, posts, categories, currentCat )} -
- {/* 展示广告 */} - -
- {/* 分类 */} {categories && (
diff --git a/components/Toc.js b/components/Toc.js index 9665c175..55c640e1 100644 --- a/components/Toc.js +++ b/components/Toc.js @@ -51,14 +51,14 @@ const Toc = ({ toc }) => { }, throttleMs)) return <> -