From 02951d426eaadb6e97c6a3c0c6597171309078b5 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Thu, 24 Aug 2023 12:35:22 +0800
Subject: [PATCH] =?UTF-8?q?layout=E9=80=89=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.jsx | 115 +++++++++++++++++++++++++++++++++++++++--------
src/assets/css/reset.css | 110 +++++++++++++++++++++++++++++++++++++++++++++
src/main.jsx | 5 ++-
3 files changed, 209 insertions(+), 21 deletions(-)
create mode 100644 src/assets/css/reset.css
diff --git a/src/App.jsx b/src/App.jsx
index f604890..585e29c 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,21 +1,98 @@
-import { Component } from 'react'
-import { Button } from 'antd'
-import { Routes, Route } from 'react-router-dom'
-
-const Home = () => {
- return
首页
-}
-const About = () => {
- return 关于
-}
-
-export default class App extends Component {
- render() {
- return (
-
- }>
- }>
-
- )
+import React, { useState } from 'react'
+import {
+ DesktopOutlined,
+ FileOutlined,
+ PieChartOutlined,
+ TeamOutlined,
+ UserOutlined,
+} from '@ant-design/icons'
+import { Breadcrumb, Layout, Menu, theme } from 'antd'
+const { Header, Content, Footer, Sider } = Layout
+function getItem(label, key, icon, children) {
+ return {
+ key,
+ icon,
+ children,
+ label,
}
}
+const items = [
+ getItem('Option 1', '1', ),
+ getItem('Option 2', '2', ),
+ getItem('User', 'sub1', , [
+ getItem('Tom', '3'),
+ getItem('Bill', '4'),
+ getItem('Alex', '5'),
+ ]),
+ getItem('Team', 'sub2', , [
+ getItem('Team 1', '6'),
+ getItem('Team 2', '8'),
+ ]),
+ getItem('Files', '9', ),
+]
+const App = () => {
+ const [collapsed, setCollapsed] = useState(false)
+ const {
+ token: { colorBgContainer },
+ } = theme.useToken()
+ return (
+
+ setCollapsed(value)}
+ >
+
+
+
+
+
+
+
+ User
+ Bill
+
+
+ Bill is a cat.
+
+
+
+
+
+ )
+}
+export default App
diff --git a/src/assets/css/reset.css b/src/assets/css/reset.css
new file mode 100644
index 0000000..173b4a9
--- /dev/null
+++ b/src/assets/css/reset.css
@@ -0,0 +1,110 @@
+/* http://meyerweb.com/eric/tools/css/reset/ */
+/* v1.0 | 20080212 */
+
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+font,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-size: 100%;
+ vertical-align: baseline;
+ background: transparent;
+}
+body {
+ line-height: 1;
+}
+ol,
+ul {
+ list-style: none;
+}
+blockquote,
+q {
+ quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+ content: '';
+ content: none;
+}
+
+/* remember to define focus styles! */
+:focus {
+ outline: 0;
+}
+
+/* remember to highlight inserts somehow! */
+ins {
+ text-decoration: none;
+}
+del {
+ text-decoration: line-through;
+}
+
+/* tables still need 'cellspacing="0"' in the markup */
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
diff --git a/src/main.jsx b/src/main.jsx
index a97bc0d..e5e8d4b 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,7 +1,8 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
-import {BrowserRouter as Router} from "react-router-dom";
+import { BrowserRouter as Router } from 'react-router-dom'
import App from './App.jsx'
+import '@/assets/css/reset.css'
import './index.css'
ReactDOM.createRoot(document.getElementById('root')).render(
@@ -9,5 +10,5 @@ ReactDOM.createRoot(document.getElementById('root')).render(
-
+ ,
)