From 15b931d88418975af5ee9a4df86e4f92a99c06aa Mon Sep 17 00:00:00 2001
From: Jzx201211 <1595536662@qq.com>
Date: Thu, 24 Feb 2022 16:46:51 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BD=AE=E6=92=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/center1.js | 134 +++++++++++++++++++++++++++++++++++++++++++
src/pages/index.css | 85 +++++++++++++++++++++++++++
src/pages/index.less | 13 +++++
src/pages/index.tsx | 20 ++-----
src/pages/menu.js | 73 +++++++++++++++++++++++
5 files changed, 310 insertions(+), 15 deletions(-)
create mode 100644 src/pages/center1.js
create mode 100644 src/pages/index.css
create mode 100644 src/pages/menu.js
diff --git a/src/pages/center1.js b/src/pages/center1.js
new file mode 100644
index 00000000..e01b997a
--- /dev/null
+++ b/src/pages/center1.js
@@ -0,0 +1,134 @@
+import React, { Component } from "react";
+import { Carousel } from "antd";
+import "./index.css";
+import { Menu } from "antd";
+import {
+ MailOutlined,
+ AppstoreOutlined,
+ SettingOutlined,
+} from "@ant-design/icons";
+
+const { SubMenu } = Menu;
+
+export default class Center1 extends Component {
+ render() {
+ return (
+
+
+
+
+
+
+
+
1
+
+
+
2
+
+
+
3
+
+
+
4
+
+
+
+
+
+ );
+ }
+}
diff --git a/src/pages/index.css b/src/pages/index.css
new file mode 100644
index 00000000..6aa0a601
--- /dev/null
+++ b/src/pages/index.css
@@ -0,0 +1,85 @@
+*{
+ margin: 0px;
+ padding: 0px;
+}
+.menu{
+ width: 100%;
+ height: 64px;
+ padding: 0 50px;
+ line-height: 64px;
+ background: #001529;
+ float: left;
+}
+.menu ul{
+ list-style: none;
+ display: flex;
+ color: white;
+}
+.menu ul li{
+ margin-right: 30px;
+ position: relative;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+}
+.menu ul li:hover{
+ color: #b7b7b7;
+}
+.active{
+ color: #1890ff !important;
+}
+
+
+.center1{
+ width: 100%;
+ float: left;
+ height: 345px;
+ margin-top: 30px;
+}
+.center1_main{
+ border-radius: 8px ;
+ height: 345px;
+ width: 1200px;
+ margin: 0 auto;
+}
+.center1_main_left{
+ list-style: none;
+ border-radius: 8px 0 0 8px;
+ height: 345px;
+ width: 160px;
+ padding: 10px 20px 0 20px;
+ float: left;
+ background: black;
+ margin-bottom: 0px;
+ border-right: 0px;
+}
+.center1_main_left_box{
+ margin-right: 20px;
+ color: #fff;
+ width: 120px;
+ height: 40px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1px solid #4b4b4b;
+ font-size: 12px;
+ padding: 0!important;
+}
+.center1_picture{
+ height: 345px;
+ width: 1040px;
+ line-height: 345px;
+ text-align: center;
+ float: left;
+ background: blue;
+}
+
+.center_picture ant-carousel{
+ height: 345px;
+}
+
+ /deep/.ant-menu-submenu-title{
+ padding: 0 0 0 0;
+ margin:0 0 0 0;
+ }
diff --git a/src/pages/index.less b/src/pages/index.less
index 586302bf..ed0c34d2 100644
--- a/src/pages/index.less
+++ b/src/pages/index.less
@@ -1,3 +1,16 @@
.title {
background: rgb(121, 242, 157);
}
+:global {
+ .ant-menu-vertical .ant-menu-item,
+ .ant-menu-vertical-left .ant-menu-item,
+ .ant-menu-vertical-right .ant-menu-item,
+ .ant-menu-inline .ant-menu-item,
+ .ant-menu-vertical .ant-menu-submenu-title,
+ .ant-menu-vertical-left .ant-menu-submenu-title,
+ .ant-menu-vertical-right .ant-menu-submenu-title,
+ .ant-menu-inline .ant-menu-submenu-title {
+ padding: 0;
+ margin: 0;
+ }
+}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index eae93138..d8b49741 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,5 +1,8 @@
import styles from "./index.less";
import { Carousel } from "antd";
+import "./index.css";
+import Menu from "./menu.js";
+import Center1 from "./center1.js";
const contentStyle = {
height: "160px",
@@ -12,21 +15,8 @@ const contentStyle = {
export default function IndexPage() {
return (
-
Page index
-
-
-
1
-
-
-
2
-
-
-
3
-
-
-
4
-
-
+ {
}
+ {
}
);
}
diff --git a/src/pages/menu.js b/src/pages/menu.js
new file mode 100644
index 00000000..a6c1b9e8
--- /dev/null
+++ b/src/pages/menu.js
@@ -0,0 +1,73 @@
+import React, { Component } from "react";
+import "./index.css";
+
+export default class Menu extends Component {
+ state = {
+ list: [
+ {
+ id: 1,
+ text: "首页",
+ },
+ {
+ id: 2,
+ text: "实践课程",
+ },
+ {
+ id: 3,
+ text: "实践项目",
+ },
+ {
+ id: 4,
+ text: "教学课堂",
+ },
+ {
+ id: 5,
+ text: "在线竞赛",
+ },
+ {
+ id: 6,
+ text: "教学案例",
+ },
+ {
+ id: 7,
+ text: "交流问答",
+ },
+ {
+ id: 8,
+ text: "大学开源",
+ },
+ {
+ id: 9,
+ text: "工程认证",
+ },
+ ],
+ current: 0,
+ };
+ render() {
+ return (
+
+
+ {this.state.list.map((item, index) => (
+ - this.handleClick(index)}
+ >
+ {item.text}
+
+ ))}
+
+
+ );
+ }
+ handlemove(index) {
+ console.log(index);
+ }
+ handleClick(index) {
+ console.log(index);
+
+ this.setState({
+ current: index,
+ });
+ }
+}