From 66fc70e4f9c3b04668ff576891e2dffab3dd45d6 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 1 Feb 2024 11:57:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E4=B8=9D?= =?UTF-8?q?=E6=BB=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ThemeSwitch.js | 8 +++++--- pages/_document.js | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/ThemeSwitch.js b/components/ThemeSwitch.js index 6284e2b6..ba39b539 100644 --- a/components/ThemeSwitch.js +++ b/components/ThemeSwitch.js @@ -25,7 +25,9 @@ const ThemeSwitch = () => { const query = router.query query.theme = newTheme router.push({ pathname: router.pathname, query }).then(() => { - setIsLoading(false) + setTimeout(() => { + setIsLoading(false) + }, 500); }) } @@ -72,8 +74,8 @@ const ThemeSwitch = () => { {/* 切换主题加载时的全屏遮罩 */} -
diff --git a/pages/_document.js b/pages/_document.js index 976a45fb..e1e78253 100644 --- a/pages/_document.js +++ b/pages/_document.js @@ -28,7 +28,7 @@ class MyDocument extends Document { })} - +