feat: 🎸 安装了全局骨架屏
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
min-height: 100vh;
|
||||
width: 100%;
|
||||
background-color: #f2f3f5;
|
||||
|
||||
.app-layout-skeleton {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
padding: 100px;
|
||||
background-color: aqua;
|
||||
}
|
||||
}
|
||||
/* 主内容区域 */
|
||||
.main-content {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { useState, useEffect } from "react";
|
||||
import { Skeleton } from "@arco-design/web-react";
|
||||
import Sidebar from "../Sidebar";
|
||||
import "./index.css";
|
||||
|
||||
@@ -8,7 +9,9 @@ const Layout = ({ children }) => {
|
||||
return (
|
||||
<div className="app-layout">
|
||||
<Sidebar isCollapsed={isCollapsed} setIsCollapsed={setIsCollapsed} />
|
||||
<main className="main-content">{children}</main>
|
||||
<Skeleton loading={false} animation className="app-layout-skeleton">
|
||||
<main className="main-content">{children}</main>
|
||||
</Skeleton>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user