From c8c1e71480d3fbace2502f8a490a64a2e55ffdc1 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 16 Mar 2022 13:12:05 +0800 Subject: [PATCH] =?UTF-8?q?hexo=20=E5=9B=9E=E9=A1=B6=20=E6=8C=89=E9=92=AE?= =?UTF-8?q?=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/LayoutBase.js | 10 +++++----- themes/hexo/components/FloatDarkModeButton.js | 2 +- themes/hexo/components/JumpToCommentButton.js | 2 +- themes/hexo/components/JumpToTopButton.js | 2 +- themes/hexo/components/PaginationNumber.js | 4 ++-- themes/hexo/components/TocDrawerButton.js | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index dd186e06..93e5b129 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -17,7 +17,7 @@ import FloatDarkModeButton from './components/FloatDarkModeButton' const LayoutBase = (props) => { const { children, headerSlot, floatSlot, meta } = props const [show, switchShow] = useState(false) - const [percent, changePercent] = useState(0) // 页面阅读百分比 + // const [percent, changePercent] = useState(0) // 页面阅读百分比 const scrollListener = () => { const targetRef = document.getElementById('wrapper') @@ -31,7 +31,7 @@ const LayoutBase = (props) => { if (shouldShow !== show) { switchShow(shouldShow) } - changePercent(per) + // changePercent(per) } useEffect(() => { smoothscroll.polyfill() @@ -55,11 +55,11 @@ const LayoutBase = (props) => { {/* 右下角悬浮 */} -
-
+
+
{floatSlot} - +
diff --git a/themes/hexo/components/FloatDarkModeButton.js b/themes/hexo/components/FloatDarkModeButton.js index 196a7875..b6122ba9 100644 --- a/themes/hexo/components/FloatDarkModeButton.js +++ b/themes/hexo/components/FloatDarkModeButton.js @@ -21,7 +21,7 @@ export default function FloatDarkModeButton () { return (
diff --git a/themes/hexo/components/JumpToCommentButton.js b/themes/hexo/components/JumpToCommentButton.js index 736468d4..cc96497c 100644 --- a/themes/hexo/components/JumpToCommentButton.js +++ b/themes/hexo/components/JumpToCommentButton.js @@ -17,7 +17,7 @@ const JumpToCommentButton = () => { } } - return (
+ return (
) } diff --git a/themes/hexo/components/JumpToTopButton.js b/themes/hexo/components/JumpToTopButton.js index de1bce3d..427ef500 100644 --- a/themes/hexo/components/JumpToTopButton.js +++ b/themes/hexo/components/JumpToTopButton.js @@ -15,7 +15,7 @@ const JumpToTopButton = ({ showPercent = true, percent }) => { return <> } const { locale } = useGlobal() - return (
window.scrollTo({ top: 0, behavior: 'smooth' })} > + return (
window.scrollTo({ top: 0, behavior: 'smooth' })} >
{showPercent && (
{percent}
)}
) diff --git a/themes/hexo/components/PaginationNumber.js b/themes/hexo/components/PaginationNumber.js index 56942531..45d9282b 100644 --- a/themes/hexo/components/PaginationNumber.js +++ b/themes/hexo/components/PaginationNumber.js @@ -37,7 +37,7 @@ const PaginationNumber = ({ page, totalPage }) => { @@ -48,7 +48,7 @@ const PaginationNumber = ({ page, totalPage }) => { function getPageElement (page, currentPage) { return - {page} diff --git a/themes/hexo/components/TocDrawerButton.js b/themes/hexo/components/TocDrawerButton.js index a4bba1a4..144af536 100644 --- a/themes/hexo/components/TocDrawerButton.js +++ b/themes/hexo/components/TocDrawerButton.js @@ -14,7 +14,7 @@ const TocDrawerButton = (props) => { return <> } const { locale } = useGlobal() - return (
+ return (
) }