diff --git a/src/mulan/Components/Login/Index.scss b/src/mulan/Components/Login/Index.scss
new file mode 100644
index 00000000..2995c97e
--- /dev/null
+++ b/src/mulan/Components/Login/Index.scss
@@ -0,0 +1,30 @@
+.loginModal{
+ .ant-modal-body{
+ padding:0px;
+ .ant-menu{
+ border-radius: 8px 8px 0px 0px;
+ font-size: 17px;
+ }
+ .content{
+ padding:40px 50px;
+ .subbtn{
+ display: block;
+ height: 40px;
+ line-height: 40px;
+ width: 100%;
+ text-align: center;
+ border-radius: 5px;
+ background-color: #ccc;
+ color: #fff;
+ margin-bottom: 10px;
+ font-size:16px;
+ &.activeBtn{
+ background-color: #1890ff;
+ }
+ }
+ .saveitem{
+ margin-bottom: 0px;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/mulan/Components/Login/Login.jsx b/src/mulan/Components/Login/Login.jsx
new file mode 100644
index 00000000..debbbd0c
--- /dev/null
+++ b/src/mulan/Components/Login/Login.jsx
@@ -0,0 +1,50 @@
+import React, { useState , forwardRef } from 'react';
+import { Form , Input , Checkbox } from 'antd';
+import "./Index.scss";
+
+function LoginModal({form}){
+ const [ active , setActive ] = useState(false);
+
+ const { getFieldDecorator, validateFields , setFieldsValue , getFieldsValue } = form;
+
+ function changeInput(){
+ const { account , password } = getFieldsValue();
+ if(account && password){
+ setActive(true);
+ }else{
+ setActive(false);
+ }
+ }
+ return(
+
+ {getFieldDecorator("account",{
+ rules:[{required:true,message:"请输入登录账号"}]
+ })(
+
+ )}
+
+
+ {getFieldDecorator("password",{
+ rules:[{required:true,message:"请输入登录密码"}]
+ })(
+
+ )}
+
+ {
+ active ?
+ 登录
+ :
+ 登录
+ }
+
+ {getFieldDecorator("savePass",{
+ rules:[]
+ })(
+ 记住密码
+ )}
+
+
+ )
+}
+export default Form.create()(forwardRef(LoginModal));
\ No newline at end of file
diff --git a/src/mulan/Components/Login/LoginModal.jsx b/src/mulan/Components/Login/LoginModal.jsx
new file mode 100644
index 00000000..7adf2f87
--- /dev/null
+++ b/src/mulan/Components/Login/LoginModal.jsx
@@ -0,0 +1,34 @@
+import React, { useState } from 'react';
+import { Modal , Menu } from 'antd';
+import "./Index.scss";
+import Login from './Login';
+import Register from './Register';
+
+function LoginModal({visible,}){
+ const [ n , setN ] = useState("0");
+ return(
+
+
+
+ {
+ n === "0"?
+
+ :
+
+ }
+
+
+ )
+}
+export default LoginModal;
\ No newline at end of file
diff --git a/src/mulan/Components/Login/Register.jsx b/src/mulan/Components/Login/Register.jsx
new file mode 100644
index 00000000..6762d961
--- /dev/null
+++ b/src/mulan/Components/Login/Register.jsx
@@ -0,0 +1,43 @@
+import React, { useState , forwardRef } from 'react';
+import { Form , Input } from 'antd';
+import "./Index.scss";
+
+function Register({form}){
+ const [ active , setActive ] = useState(false);
+
+ const { getFieldDecorator, validateFields , setFieldsValue , getFieldsValue } = form;
+
+ function changeInput(){
+ const { account , password } = getFieldsValue();
+ if(account && password){
+ setActive(true);
+ }else{
+ setActive(false);
+ }
+ }
+ return(
+
+ {getFieldDecorator("account",{
+ rules:[{required:true,message:"请输入注册账号"}]
+ })(
+
+ )}
+
+
+ {getFieldDecorator("password",{
+ rules:[{required:true,message:"请输入注册密码"}]
+ })(
+
+ )}
+
+ {
+ active ?
+ 注册
+ :
+ 注册
+ }
+
+ )
+}
+export default Form.create()(forwardRef(Register));
\ No newline at end of file
diff --git a/src/mulan/HOC/Header.jsx b/src/mulan/HOC/Header.jsx
index d75a7b50..f7430259 100644
--- a/src/mulan/HOC/Header.jsx
+++ b/src/mulan/HOC/Header.jsx
@@ -1,10 +1,10 @@
import React from 'react';
import Nav from './Nav';
-function Header(props){
+function Header({users}){
return(
-
+
)
}
diff --git a/src/mulan/HOC/HomeHeader.jsx b/src/mulan/HOC/HomeHeader.jsx
index 140c167c..39fa2a0d 100644
--- a/src/mulan/HOC/HomeHeader.jsx
+++ b/src/mulan/HOC/HomeHeader.jsx
@@ -1,11 +1,10 @@
import React from 'react';
import Nav from './Nav';
-function HomeHeader(props){
+function HomeHeader({users}){
return(
-
-
+
)
}
diff --git a/src/mulan/HOC/HomeHoc.jsx b/src/mulan/HOC/HomeHoc.jsx
index 8160039b..d2aa14f9 100644
--- a/src/mulan/HOC/HomeHoc.jsx
+++ b/src/mulan/HOC/HomeHoc.jsx
@@ -1,15 +1,24 @@
-import React, { Component } from 'react';
+import React, { Component, useState } from 'react';
import Header from './HomeHeader';
import './Index.scss';
export function HomeHoc(Sub){
return class II extends Component {
+ constructor(props){
+ super(props);
+ this.state={
+ users:undefined
+ }
+ }
render(){
+ const { users } = this.state;
return(
-
+
)
}
}
diff --git a/src/mulan/HOC/Index.scss b/src/mulan/HOC/Index.scss
index 27ad3572..c944b2b4 100644
--- a/src/mulan/HOC/Index.scss
+++ b/src/mulan/HOC/Index.scss
@@ -32,6 +32,8 @@
.headDiv{
width:1200px;
margin: 0px auto;
+ display: flex;
+ justify-content: space-between;
.headerNav{
display: flex;
height: 100%;
@@ -42,6 +44,11 @@
font-size: 16px;
}
}
+ .headUserInfo{
+ a{
+ color: #fff;
+ }
+ }
}
.homebody{
diff --git a/src/mulan/HOC/Nav.jsx b/src/mulan/HOC/Nav.jsx
index 5d1b5688..ab6d69a1 100644
--- a/src/mulan/HOC/Nav.jsx
+++ b/src/mulan/HOC/Nav.jsx
@@ -1,15 +1,29 @@
-import React from 'react';
+import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import logo from '../images/logo.png';
-function Nav(props){
+import LoginModal from '../Components/Login/LoginModal';
+
+function Nav({users}){
+ const [ visible ,setVisible ] = useState(false);
+
+
return(
+

- 首页
- 开源软件
- 开源许可证
+
)
}