From cb86beec208fc031d2176b874330426d7fd64df4 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 7 Dec 2022 12:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9loading=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/[...slug].js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/[...slug].js b/pages/[...slug].js index 63eb5e51..997297e7 100644 --- a/pages/[...slug].js +++ b/pages/[...slug].js @@ -24,6 +24,7 @@ const Slug = props => { const [lock, setLock] = React.useState(post?.password && post?.password !== '') React.useEffect(() => { + changeLoadingState(false) if (post?.password && post?.password !== '') { setLock(true) } else { @@ -32,7 +33,6 @@ const Slug = props => { }, [post]) if (!post) { - changeLoadingState(true) setTimeout(() => { if (isBrowser()) { const article = document.getElementById('container') @@ -47,8 +47,6 @@ const Slug = props => { return } - changeLoadingState(false) - /** * 验证文章密码 * @param {*} result