From a654360478e8deefa385e5c7e5dca18a69e0257a Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Sun, 2 Mar 2025 16:11:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E6=9C=AC=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 ++ src/App.tsx | 76 ++++++++++++++++++++++++++++++++++++++--------- src/components/Footer.tsx | 2 +- src/components/Header.tsx | 2 +- src/components/Menu.tsx | 3 ++ src/pages/login/Login.tsx | 2 +- tailwind.config.js | 2 +- 7 files changed, 72 insertions(+), 18 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 src/components/Menu.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8e32d15 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cSpell.words": ["Sider"] +} diff --git a/src/App.tsx b/src/App.tsx index 80df7cd..51e3038 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,20 +1,68 @@ -import React from 'react'; +import React from "react"; -import './App.scss'; -import { Outlet } from 'react-router'; +import "./App.scss"; +import { Outlet } from "react-router"; +import { Layout } from "antd"; +import { default as AppHeader} from "./components/Header"; +import { default as AppFooter} from "./components/Footer"; +import Menu from "./components/Menu"; + +const { Header, Footer, Sider, Content } = Layout; function App() { - return ( -
- APP - -
- -
-
- ); + const headerStyle: React.CSSProperties = { + textAlign: "center", + color: "#fff", + height: 64, + paddingInline: 48, + lineHeight: "64px", + backgroundColor: "#4096ff", + }; + + const contentStyle: React.CSSProperties = { + textAlign: "center", + minHeight: 120, + lineHeight: "120px", + color: "#fff", + backgroundColor: "#0958d9", + }; + + const siderStyle: React.CSSProperties = { + textAlign: "center", + lineHeight: "100vh", + color: "#fff", + backgroundColor: "#3165D2", + }; + + const footerStyle: React.CSSProperties = { + textAlign: "center", + color: "#fff", + backgroundColor: "#4096ff", + }; + + const layoutStyle = { + overflow: "hidden", + }; + return ( +
+ + + + + +
+ +
+ + + +
+ +
+
+ +
+ ); } export default App; diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 73f9444..b442417 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -1,3 +1,3 @@ export default function Footer() { - return
Footer
+ return
AppFooter
} \ No newline at end of file diff --git a/src/components/Header.tsx b/src/components/Header.tsx index 6b7e272..de35ae4 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -1,3 +1,3 @@ export default function Header() { - return
Header
+ return
AppHeader
} \ No newline at end of file diff --git a/src/components/Menu.tsx b/src/components/Menu.tsx new file mode 100644 index 0000000..da72563 --- /dev/null +++ b/src/components/Menu.tsx @@ -0,0 +1,3 @@ +export default function Menu() { + return
Menu
+} \ No newline at end of file diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx index 4fb3606..17ebce3 100644 --- a/src/pages/login/Login.tsx +++ b/src/pages/login/Login.tsx @@ -18,7 +18,7 @@ export default function Login() { className="bg-cover bg-center flex justify-center items-center h-[100vh]" style={{ backgroundImage: `url(${img_bg})` }}>