diff --git a/components/Loading.js b/components/Loading.js
index 1cf295cd..d02ab07e 100644
--- a/components/Loading.js
+++ b/components/Loading.js
@@ -1,25 +1,11 @@
/**
- * 主题文件被加载出之前的占位符
+ * 异步文件加载过程中的占位符
* @returns
*/
const Loading = (props) => {
-// const { theme, setOnReading } = useGlobal()
- // console.log('开启遮罩')
- // setOnReading(true)
-
- // useEffect(() => {
- // // 返回一个函数,在组件销毁时设置 onReading 为 false
- // return () => {
- // setTimeout(() => {
- // console.log('关闭遮罩')
- // setOnReading(false)
- // }, 500)
- // }
- // })
-
- return
-
+ return
+
}
export default Loading
diff --git a/pages/_document.js b/pages/_document.js
index 0e762a82..d9e0b447 100644
--- a/pages/_document.js
+++ b/pages/_document.js
@@ -2,6 +2,7 @@
import Document, { Html, Head, Main, NextScript } from 'next/document'
import BLOG from '@/blog.config'
import CommonScript from '@/components/CommonScript'
+import Loading from '@/components/Loading'
class MyDocument extends Document {
static async getInitialProps(ctx) {
@@ -11,17 +12,18 @@ class MyDocument extends Document {
render() {
return (
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
)
}
}